Hi,

I have this lame question. I want to convert a list (each with varies in
length) to matrix with same row length by eliminating vectors outside the
needed range.
For example:

l<-list(NULL)
l[[1]]=1,2,3.7
l[[2]]=3,4,5,6,3
l[[3]]=4,2,5,7
l[[4]]=2,4,6,3,2
l[[5]]=3,5,7,2


#so say I want to only have 4 rows and 5 column in my matrix (or
data.frame) and eliminating the 5th index value in l[[2]] and l[[4]]
#what is the simplest code would be? I actually have hundreds of the list
components.

thanks

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to