Questions tagged as 'r'

2
answers

Update the version of RStudio R?

The version of R I have installed is outdated. What is the procedure for updating R considering that I use RStudio in Windows?     
asked by 06.01.2016 / 22:19
1
answer

ARIMA model with lag in 1 and 25 in R

Please, when applying the ARIMA model (p, d, q) in a series, the partial autocorrelation function shows a peak in lag 1 and another in 25 and no other statistically significant. Is there any command in R to handle these two lags only, not includ...
asked by 05.11.2015 / 16:29
1
answer

Create matrix of frequency distribution in R (numerical variable VS numerical)

I have two columns: supply situation (categorical variable) and number of students (numeric variable). I want to create a table that tells how many students are in each mode (class / levels). The goal is this (example): Thank you, PS: By...
asked by 24.04.2015 / 19:56
2
answers

Survey package and counting

I am working with the IBGE database - PNAD with the help of the Survey package. To get a response count (eg, proportion of people under the age of 15 in the north) do I need to use this package? in which case would the command be?     
asked by 10.11.2014 / 15:34
2
answers

How to delete a set of specific rows, listed in a vector, from a data frame in R?

Hello, I have a data.frame with thousands of rows and a vector with the rows I need this date.frame, how do I select only rows from the list in a separate object?     
asked by 05.11.2014 / 04:02
1
answer

Doubt about conditional (if) in function

I have a set of 300 and few spreadsheets in which we have to create a function with 3 arguments: the directory where the spreadsheets are, the variable that will be analyzed and the amount of files to analyze. In the case in question we have...
asked by 10.11.2014 / 19:46
1
answer

I get NA when I convert character to time (POSIXlt)

Why do I get NA when I do this character conversion to POSIXlt? library(bReeze) data(winddata) tempo <- winddata[,1] tempo[1:6] # Preview # [1] "06.05.2009 11:20" "06.05.2009 11:30" "06.05.2009 11:40" tempo_POSIX...
asked by 26.09.2014 / 16:12
3
answers

Replace Zero and Infinity values in an array (R)

In the example matrix below (daily stock returns): IBOV PETR4 VALE5 ITUB4 BBDC4 PETR3 [1,] -0.03981646 -0.027412907 -0.051282051 -0.05208333 -0.047300526 -0.059805285 [2,] -0.03000415 -0.030534351 -0.04...
asked by 02.06.2014 / 15:54
2
answers

File Import in R - Taking only part of the name

With a local xlsx file, only the file name is random (it changes the date and time at the end of the file name), and was wondering if you can read the file just by the beginning of the name. The following is the file name: df = read_excel("r...
asked by 24.10.2018 / 14:29
1
answer

Error with the function lapply

I try to execute the following function: result<-lapply(mylist,function(x)cbind(x,var=tapply(x[,c(3)],x[,c(1)],sum))) But, this error appears: Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 3...
asked by 08.10.2018 / 21:38