Questions tagged as 'r'

2
answers

Look up values in one data.frame and add in another (R)

I have 2 data.frames, the first is a data.frame that contains stock data and a column with a unique identifier (column "ISIN") , as shown below: > Teste=data.frame(matrix(runif(20), nrow=5, ncol=4)) Teste$ISIN <- c("A1","A2","A3","A4","A5"...
asked by 19.04.2016 / 21:30
1
answer

Change the column type in Data in R Studio

I would like to know where I can get a data modeling material in R Studio ... I need to modify some columns, changing from text to value, for example, but I do not know which command to use. Could someone tell me some material? or support sit...
asked by 01.04.2018 / 18:43
2
answers

separate columns and remove the letter t

   Given
asked by 08.01.2018 / 15:36
1
answer

Generate list of divisors of a given number n

guru = function (n){ if (n>0){ x = (n%%(1:n) == 0) cat(x) } } So, I need to create a vector that contains all the divisors of n , but when I test, with some value of n , it logically tells me whether such a number...
asked by 19.08.2018 / 20:10
2
answers

How to make loops in R

I'm working with weather data and need to do a boundary analysis for each element of my database. I need to do loops because my database is too big, but I do not know where to start. A part of my file is this: dia hora data tem_1min...
asked by 24.09.2018 / 01:37
1
answer

R code for likelihood test

I have a dataset to do a logistic regression for the dependent variable "childbirth" which is qualitative binary. With the command below I get the univariate logistic model: GLM.1 <- glm(parto ~ serie, family=binomial(logit), data=Datase...
asked by 03.08.2017 / 18:50
1
answer

What does the following line in R do? [closed]

I'm doubtful about the following line: amostra = sample(2,40,replace = T,prob=c(0.7,0.3))? In particular the argument 2 , argument 40 and replace .     
asked by 09.05.2018 / 00:57
2
answers

Create an object that contains four words. Use the sample function to sample 1000 of this object

... continuing-Find out how to use the table function to know how many times each word has been drawn. I created the 4words that are "hi" "hi" "hey" and "hi" but when I tried according to an example I saw on youtube it went wrong because ther...
asked by 16.05.2018 / 21:41
1
answer

Convert number to minute and subtract these minutes from a column containing date and time R [duplicate]

Good morning, I have a column (minutes1) that has data of the amount of min (105,90,80) I need to turn these minutes into hours (HH: MM), then subtract those hours created from another start column (DD / MM / YYYY HH: MM) that has date and...
asked by 28.09.2018 / 15:52
1
answer

How to transform a time data from 01:30 to 90 minutes in R

I have a column with data for hours, I would like to turn those hours into minutes. T.Real <- c("08:42","08:33","00:41","01:11","01:35","00:45","01:43","01:03","01:06")     
asked by 27.09.2018 / 14:52