Re: [R] How to join matrices of different row length from a list

2011-06-17 Thread Jeff Newmiller
No. --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --

Re: [R] How to join matrices of different row length from a list

2011-06-17 Thread Sheng Lin
Can this be used in matplot(x,y,)? where x and y have matching rows. However, each column may have different rows or length. Thanks. Sheng -- View this message in context: http://r.789695.n4.nabble.com/How-to-join-matrices-of-different-row-length-from-a-list-tp3177212p3607158.html Sent from t

Re: [R] How to join matrices of different row length from a list

2011-01-07 Thread A.N. Spiess
Dear Emma, there is a 'cbind.na', 'rbind.na' and 'data.frame.na' function in my qpcR package. library(qpcR) matLis <- list(matrix(1:4, 2, 2), matrix(1:6, 3, 2), matrix(2:1, 1, 2)) do.call(cbind.na, matLis) They are essentially the generic functions extended with an internal fill. You migh

Re: [R] How to join matrices of different row length from a list

2011-01-06 Thread Gabor Grothendieck
On Thu, Jan 6, 2011 at 5:56 AM, emj83 wrote: > > Hi, > > I have several matrix in a list, for example: > e > [[1]] >     [,1] [,2] > [1,]    1    3 > [2,]    2    4 > > [[2]] >     [,1] [,2] > [1,]    1    4 > [2,]    2    5 > [3,]    3    6 > > [[3]] >     [,1] [,2] > [1,]    2    1 > > I would l

Re: [R] How to join matrices of different row length from a list

2011-01-06 Thread David Winsemius
On Jan 6, 2011, at 6:23 AM, Dimitris Rizopoulos wrote: try this: matLis <- list(matrix(1:4, 2, 2), matrix(1:6, 3, 2), matrix(2:1, 1, 2)) n <- max(sapply(matLis, nrow)) do.call(cbind, lapply(matLis, function (x) rbind(x, matrix(, n-nrow(x), ncol(x) It's good that you solved the OP'

Re: [R] How to join matrices of different row length from a list

2011-01-06 Thread emj83
Excellent- that is just what I need. Thank you so much for your prompt help, Emma -- View this message in context: http://r.789695.n4.nabble.com/How-to-join-matrices-of-different-row-length-from-a-list-tp3177212p3177252.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] How to join matrices of different row length from a list

2011-01-06 Thread Dimitris Rizopoulos
try this: matLis <- list(matrix(1:4, 2, 2), matrix(1:6, 3, 2), matrix(2:1, 1, 2)) n <- max(sapply(matLis, nrow)) do.call(cbind, lapply(matLis, function (x) rbind(x, matrix(, n-nrow(x), ncol(x) I hope it helps. Best, Dimitris On 1/6/2011 11:56 AM, emj83 wrote: Hi, I have sever

[R] How to join matrices of different row length from a list

2011-01-06 Thread emj83
Hi, I have several matrix in a list, for example: e [[1]] [,1] [,2] [1,]13 [2,]24 [[2]] [,1] [,2] [1,]14 [2,]25 [3,]36 [[3]] [,1] [,2] [1,]21 I would like to join them by column i.e. [,1] [,2] [,3] [,4][,5] [,6] [1,]1