Re: [R] help assigning values to matrix

2015-04-14 Thread Adams, Jean
I think it would be easier to keep track of what you're doing, if you save the assignment to the very end of your for() loop. For example ... # create an empty matrix to be used as a template Mtemplate <- matrix(data=NA, nrow=13, ncol=3, dimnames=list(c(10,20,30,35,40,50,60,70,80,90,100,120,9

[R] help assigning values to matrix

2015-04-14 Thread David
Hi group, I am automatically creating several matrices to store results from different analyses on vectors of different lengths. The matrices are named according to each vector, so I can trace back results. I am using the following commands, which give me an error. My idea is to populate th