Dear helpeRs,
suppose I have two lists as follows:
a = list(1:5,5:9)
b = lapply(a,*,2)
I would like to rbind-ing the two lists, that is I would like to use
something as rbind applied
component to component for the two list.
I have used the following solution:
fun.tile.wt = function(list1,
Try:
mapply(rbind, a, b, SIMPLIFY = FALSE)
On 8/17/06, Domenico Vistocco [EMAIL PROTECTED] wrote:
Dear helpeRs,
suppose I have two lists as follows:
a = list(1:5,5:9)
b = lapply(a,*,2)
I would like to rbind-ing the two lists, that is I would like to use
something as rbind applied
## 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))