Re: [R] Stacking matrices

2010-03-15 Thread Chuck Cleland
On 3/15/2010 1:37 PM, jlu...@ria.buffalo.edu wrote: > What is an easy way to stack a matrix multiple times? E.g. I have a 6x6 > matrix that I need to stack vertically 154 times to get a 6*154 by 6 > matrix. I would rather not rbind(X,X,...,X) matrices.--Joe X <- matrix(runif(36), ncol=6)

Re: [R] Stacking matrices

2010-03-15 Thread Benilton Carvalho
how about y = X[rep(1:nrow(X), 6), ] ? On Mon, Mar 15, 2010 at 5:37 PM, wrote: > What is an easy way to stack a matrix multiple times?  E.g.  I have a 6x6 > matrix that I need to stack vertically 154 times to get a 6*154 by 6 > matrix.  I would rather not rbind(X,X,...,X) matrices.    --Joe >

[R] Stacking matrices

2010-03-15 Thread JLucke
What is an easy way to stack a matrix multiple times? E.g. I have a 6x6 matrix that I need to stack vertically 154 times to get a 6*154 by 6 matrix. I would rather not rbind(X,X,...,X) matrices.--Joe [[alternative HTML version deleted]]