Re: [R] coercing a list into matrix

2009-01-14 Thread Steven McKinney
Ken Sent: Wed 1/14/2009 1:50 PM To: r-help@r-project.org Subject: [R] coercing a list into matrix Dear list, I have a list of number sequences. Each number sequence has different numbers of elements. Is there a quick way (other than to iterate through the entire list) way to coerce list to ma

Re: [R] coercing a list into matrix

2009-01-14 Thread Marc Schwartz
on 01/14/2009 03:50 PM Lo, Ken wrote: > Dear list, > > I have a list of number sequences. Each number sequence has different > numbers of elements. Is there a quick way (other than to iterate > through the entire list) way to coerce list to matrix with NAs filling > in the short sequences? > >

[R] coercing a list into matrix

2009-01-14 Thread Lo, Ken
Dear list, I have a list of number sequences. Each number sequence has different numbers of elements. Is there a quick way (other than to iterate through the entire list) way to coerce list to matrix with NAs filling in the short sequences? An example of what I mean is this: A <- list(c(3,2,3)