do.call() is your friend:

mat <- do.call("rbind", myList)

Andy

> From: michael watson (IAH-C)
> 
> Hi
> 
> Sorry to ask such a basic question.  I have a list, each element of
> which is a vector of two values.  What I actually want is a 
> matrix with
> two columns, and one row per element of the list.  Obviously I have
> tried as.matrix(), and as.vector() but I didn't expect the latter to
> work.
> 
> I feel so lame asking this.  Any suggestions?
> 
> Mick
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to