[R] create distinct variable names
Sorkin, John
j@ork|n @end|ng |rom @om@um@ry|@nd@edu
Sat May 14 19:33:28 CEST 2022
I am trying to create distinct variable names of the form Corr1, Corr2, etc. so that I can run cbind(nurkle,Corrk)
When I run the code below, I receive the following error message
Error in paste(Corr,k) <- out[[k]]$acf: could not find the function paste<-
How can I create a variable name with a sequential number than can be used as the receiving end of my assignment statement?
nurkle <- out[[1]]$acf
for (k in 2:10){
paste(Corr,k) <- out[[k]]$acf
nurkle<- cbind(nurkle,Corrk)
}
Thank you,
John
[[alternative HTML version deleted]]
More information about the R-help
mailing list