This is a silly example of how to use do.call(rbind,)
on the output of Map()
[which is similar to lapply()
]
> DF <- do.call(rbind,Map(function(x) data.frame(a=x,b=x+1),x=1:3))
> DF
x y
1 1 2
2 2 3
3 3 4
> class(DF)
[1] "data.frame"
I use this construct quite often.