Re: [R] rbind-ing vectors inside lists

From: Richard M. Heiberger <rmh_at_temple.edu>
Date: Fri 18 Aug 2006 - 04:11:08 EST


## initial example

a = list(1:5, 5:9)
b = lapply(a,"*",2)

library(abind) ## you may need to download abind from CRAN abind(data.frame(a), data.frame(b), along=.5)

## data.frames with column names

a = data.frame(first=1:5, second=5:9)
b = a^2
abind(a, b, along=.5, new.names=c("a","b"))



R-help@stat.math.ethz.ch 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. Received on Fri Aug 18 04:17:24 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 18 Aug 2006 - 06:22:42 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.