For the 1000 simulations, a matrix will be generated
each time. And, I need to choose the first row of the
generated matrix. The following loop doesn't work
though:
for (i in 1:1000) {
aval[i]- matrixname[1,]
}
Any solution? thanks!
__
[EMAIL
Have you considered making aval an array with the same number of
columns as matrixname? Try the following:
aval - array(NA, dim=c(2,2))
for(i in 1:2){
matrixname - array(i+(1:4), dim=c(2,2))
aval[i,] - matrixname[1,]
}
aval
hope this helps. spencer graves
Lily wrote:
For the