我有一个data.frames列表,如下所示:
...................................
$ 97 :'data.frame': 3 obs. of 2 variables:
..$ row: int [1:3] 97 97 97
..$ col: chr [1:3] "0" "0" "0"
$ 98 :'data.frame': 3 obs. of 2 variables:
..$ row: int [1:3] 98 98 98
..$ col: chr [1:3] "0" "0" "0"
$ 99 :'data.frame': 3 obs. of 2 variables:
..$ row: int [1:3] 99 99 99
..$ col: chr [1:3] "0" "0" "0"
我想只对$ col行进行子集化并以这种方式组合:
............
97: 0,0,0
98: 0,0,0
99: 0,1,0
提前谢谢
答案 0 :(得分:1)
使用
do.call(rbind, lapply(lst,function(x) x$col))