[R] Lists to vectors...

Jun Yan jyan at stat.wisc.edu
Thu Sep 26 06:09:54 CEST 2002


> Is there a fast, vectorized way to convert a list of integer vectors, in
> which each vector has different length, to a single vector that is
> simply the concatenation of all the member vectors?  Or does one have to
> loop over the list and concatenate everything?

You may try function unlist, which flattens a list to a vector.

Jun

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list