Posts by André Muta • 308 points
6 posts
-
4
votes2
answers502
viewsA: Time Series autocorrelation
Use the function acf of R, it graphs you and returns all the serial correlations to the order you want. If you want the partial autocorrelations the function pacf ta ai. # Criando um Grid 1x3 para…
-
6
votes4
answers1339
viewsA: Equivalent to Excel SOMASES, in R
To do this you can use two R functions: aggregate to add the "duplicates", so that you have only one day/hour case for each quantity and the function acast library reshape2 to create the matrix the…
ranswered André Muta 308 -
0
votes1
answer79
viewsA: Geometric figure with data in R
I set up two functions, one to create the random coordinates of a triangle and one to plot the n triangles of random coordinates you want. The code is pretty rough, but I think it fits what you…
ranswered André Muta 308 -
5
votes2
answers16023
viewsA: How to correlate qualitative and quantitative variables in R?
As already said, this is a question more related to statistics, but as there is not a statexchange in Portuguese I will help you in this. The correlation method you are trying will only work for…
ranswered André Muta 308 -
0
votes2
answers878
viewsA: loop in correlation matrix in R
An easy way is to use the function melt package reshape2, as explained in that question (in English). code: install.packages("reshape2") # Caso você não tenha instalado o pacote ainda…
ranswered André Muta 308 -
1
votes1
answer665
viewsA: Data load error in R
Your problem is that the function read.csv2 uses the function scan(), which requires you to define which column classes of the file you are importing. You have two options, the first, which I…
ranswered André Muta 308