search for: theta2_

Displaying 1 result from an estimated 1 matches for "theta2_".

Did you mean: theta2
2009 Apr 20
3
Calling objects in a loop
...am having trouble figuring out how to get the loop to recognize that it should index for the previously defined objects. Here is a simplified version of what I am trying to do: for(i in 1:10){ assign(paste("theta1_",i,sep=""),data.frame(scale(rnorm(250)))) assign(paste("theta2_",i,sep=""),data.frame(scale(rnorm(250)))) assign(paste("theta3_",i,sep=""),data.frame(theta1_i + theta2_i) } I am having trouble with getting it to recognize that theta3_i should be calculated using theta1_i and theta2_i i...