Questions tagged as 'r'

1
answer

Extract elements from a List

I have this list: a <- list() a[[1]] <- matrix(c(1,2),nrow = 2) How do I select element 2?     
asked by 17.06.2016 / 01:35
1
answer

R how to generate a time series?

I would like to know how to generate a time series of a file that has two columns (date and value), however the date is in the following yyyy-MM-dd format. When I use the ts () command, it replaces the date value with a number, for example: t...
asked by 03.10.2015 / 01:00
1
answer

Creating an array with variables with different correlations in R?

I need to generate data series that have correlations defined using R. I used a method that I found here in the OS (#) and managed to create the variables with the desired correlation, however, when trying to automate this process for the creati...
asked by 31.03.2014 / 23:03
1
answer

Loop Error in R

I created this loop: library(forecast) a=1 b=60 while(b<=(NROW(tsarroz))){ janela=dput(tsarroz [a:b]) serie=ts(janela,freq=6) HW=HoltWinters(serie) prev=forecast(HW,6) result=data.frame(prev$mean) a=a+6 b=b+6 } It should cr...
asked by 10.10.2018 / 02:58
1
answer

Integration by the Simpson method in the R

I have the electric field data in an array, from this data I need to use the method of Simpson in this E . In MATLAB, I already have it. Does anyone know of any package or built-in R function that does this?     
asked by 28.01.2015 / 19:27
1
answer

Integration between PHP and R

I am developing a project with php and I decided to use R for statistical calculations. But I'm not sure how to do this integration. If there is a "design pattern" for situations like this.     
asked by 29.10.2015 / 13:10
1
answer

How to change the distance or rotation of the axis title of a graph relative to the axis itself

I draw the chart below using the R. plot3D package. I would like to move the label of the z axis% of the axis values a bit or leave it horizontal. Does anyone know how I can proceed? Here is the code: library("plot3D") #Function density probab...
asked by 19.05.2018 / 03:02
1
answer

EWMA volatility in a data.frame

I have a data.frame base_retorno_diario , 3560 observations in 110 actions (daily returns), I want to create another data.frame from that with Volatility ewma with decay_factor = 0.97 Data.frame example Data IBOV...
asked by 21.05.2014 / 20:47
1
answer

Error in rbind: "Error in match.names (clabs, names (xi))"

I'm trying to build a function that counts the number of complete cases in .csv (data frames) files, that is, the number of rows with values (not "NA"). The function I wrote can read the file (s) specified in the function call and count the numb...
asked by 24.08.2014 / 21:08
2
answers

Handle values from a data.frame

In the link you can find a dataset in csv about solar irradiation in Brazil. The column the_geom_4326 represents the longitudes and latitudes of a polygon, which represents a grid of solar irradiation. That is, within this grid, the val...
asked by 29.09.2016 / 22:08