r - rbind all dataframes in a list of lists by name -
this question has answer here:
- rbind dataframes in list of lists 2 answers
i'd rbind a dataframes in alist - how this?
alist <- list(a = data.frame(1:3), b = data.frame(4:6), = data.frame(7:9)) (alist <- list(alist, alist, alist))
use lapply subset out elements want, , rbind do.call on list:
do.call("rbind",lapply(alist,function(x) x[["a"]])) x1.3 1 1 2 2 3 3 4 1 5 2 6 3 7 1 8 2 9 3
Comments
Post a Comment