Displaying 1 result from an estimated 1 matches for "matrixfromlist".
2009 Jan 14
2
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 matrix with NAs filling
in the short sequences?
An example of what I mean is this:
A <- list(c(3,2,3),c(6,5))
I'd like to get A so that it is
3 2 3
6 5 NA
Best,
Ken