[R] vectorize a list

Frank Schmid fschmid at Princeton.EDU
Thu Nov 8 20:14:15 CET 2007


Dear R user

Suppose I have the following list:

 > f <- rnorm(2)
 > s <- rnorm(3)
 > l <- list(f,s)
 > l
[[1]]
[1] 0.31784399 0.08575421

[[2]]
[1] -0.6191679  0.7615479 -1.0087659


Can I stack the entries of this list in 1 vector with the first list 
entry followed by the second? The reference manual says that I can use 
the command /stack/, which can take as arguments either a list or a data 
frame. But taking simply /stack(l)/ does not work, although it is a list.

Many thanks for your hint

Frank Schmid



More information about the R-help mailing list