Questions tagged as 'r'

2
answers

What to do so that the result of a calculation with a loop is saved in my df?

My intention with the following code is to divide two df based on the field date , to then apply a calculation and save the result of each date in a single df . This is what I tried: for (i in unique(temp_maxmin$date))...
asked by 14.11.2017 / 16:34
1
answer

non-numeric argument to 'pairs' in R

I was trying to make a correlation matrix with the scatterplotMatrix() command in R and get this error:    scatterplotMatrix (a_heterophylla_NAY_SIN, spread = FALSE, lty.smooth = 2,   main="Matrix correlations") Error in pairs.default...
asked by 18.09.2017 / 21:58
1
answer

Subtract the previous value within a row and accumulate it in another matrix in R

My intention is for a given matrix, go through the row and each value [i,j] subtract the value [i,j-1] . Once traveled, if the value is negative, it accumulates it in [i,2] and if it is positive in [i,1] . Here's an...
asked by 25.09.2017 / 17:57
1
answer

Modify a dataframe with dependencies

I have a dataframe like this: > print(A) 5 3 7 6 11 4 20 8 16 18 r01 1 1 1 1 1 1 1 1 1 0 r02 0 0 0 0 0 0 0 1 1 0 r03 1 0 1 0 1 1 0 0 0 0 r04 0 1 0 0 0 1 0 1 0 1 r05 1 1 0 1 1 1 0 0 1 1...
asked by 02.07.2017 / 15:21
1
answer

Remove duplicates from column ID but keep values in new columns in R

I have this data.frame : c_dupli <- data.frame(id=c(1,1,2), value=c(10,20,30)) My intention is to leave the id unique, but keep the value different in another / s column / s. The expected result is the following: s_...
asked by 03.06.2017 / 02:13
0
answers

Predict values using forecast.Arima and xreg

I am trying to predict values using forecast.Arima and the arguments xtreg and h My codes in R are: monthlylFatal <- ts(Spainmonthly$fatalities, start=c(1995,1), end= c(2013,12), frequency=12) Spainpps <-...
asked by 04.05.2017 / 11:23
0
answers

Problems with Brew in Rapache

Good, I recently installed rapache in ubuntu server 14.04, I made all the configurations and created the file r.conf and r.load in / etc / apache2 / mods-available. Inside r.conf I place  SetHandler r-script  RHandler sys.source And I do s...
asked by 08.03.2017 / 14:39
0
answers

Deviance equal to 0

I have a question about calculating the value of deviance. I am carrying out the analysis of a community and relating it to environmental variables, so I am interested in having some information criteria. My different models can be summarized...
asked by 21.02.2017 / 05:06
1
answer

In R, divide dataframe by ranges of column values. Make operations iteratively and paste results

I have a very simplified version of a fairly large dataframe A (50 columns and 1000000 lines): Palabra Frecuencia Numero hola(1.4) 0.15 1 amigo(1.2) 0.67 2 sol(0.3) 0.85 7 hola(7.1) 0.4 3 hola(5.1...
asked by 09.02.2017 / 00:55
1
answer

All possible solutions of a system of equations in R

I have the following system of equations: x+y+z=20 z-y>0 y-x>0 I would like to know if there is any way in R to list all possible solutions for x, y, z and be able to save them in a matrix (3, m), where m represents the number of poss...
asked by 22.11.2017 / 13:57