Re: [R] Storing loop output in matrix

2011-01-31 Thread Peter Ehlers
On 2011-01-31 13:49, Dean Castillo wrote: Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: M<-mat.or.vec(11,89) for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)} datain is a matrix (11,91). I only want to use the pic() function on t

Re: [R] Storing loop output in matrix

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 4:49 PM, Dean Castillo wrote: Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: M<-mat.or.vec(11,89) R code to create a matix would use the matrix function, for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)}