【发布时间】:2013-08-31 12:41:42
【问题描述】:
我想从列表中的列表形成一个 data.frame
L1 <- list(A = c(1, 2, 3), B = c(5, 6, 7))
L2 <- list(A = c(11, 22, 33), B = c(15, 16, 17))
L3 <- list(L1, L2)
L3
library(data.table)
根据 'data.table' 手册:“'rbindlist' 与 do.call("rbind",l) 相同,但要快得多"
我想使用 R 基础包实现 'rbindlist' 的功能
rbindlist 完全符合我的需要,但 'do.call' 没有!
rbindlist(L3)
do.call 没有做我想做的事
do.call(rbind, L3)
identical(rbindlist(L3), do.call(rbind, L3))
【问题讨论】:
标签: r data.table