[R] convert 'list' to 'vector'?

peter dalgaard pdalgd at gmail.com
Thu Aug 11 00:30:31 CEST 2011


On Aug 10, 2011, at 23:39 , David Winsemius wrote:

> Hopefully this expected invitation to grilling will not result in severe burns. I note that one of the *apply family would have been successful in returning the desired object in conjunction with c() :
> 
> > rapply(x, c)
> [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l"
> 
> `rapply` is designed to do a complete traversal of the list structure and its default "how" argument is "unlist". It was linked from the page where you were looking at `simplify2array`.

Speaking of help pages, a brief look at the arguments for c() might be enlightening. 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
"Døden skal tape!" --- Nordahl Grieg



More information about the R-help mailing list