Re: [R] Putting the same array into a matrix

2010-10-14 Thread Charles C. Berry
On Thu, 14 Oct 2010, Desmond Lim wrote: Hi, I have an array and I want to put in into a matrix x number of times. Currently I doing this matrix <- cbind(array, array, array). Is there a more elegant way of doing this? Fortunately! If 'array' really is a matrix (bad choice of names here, B

[R] Putting the same array into a matrix

2010-10-14 Thread Desmond Lim
Hi, I have an array and I want to put in into a matrix x number of times. Currently I doing this matrix <- cbind(array, array, array). Is there a more elegant way of doing this? I've tried matrix <- cbind(rep(array, times=x)) and matrix <- rep(cbind(array), times = 5) but it didn't work. Th