在r行中取消列出列表

时间:2019-07-11 04:16:58

标签: r list

有什么方法可以取消R展平吗?

即我的清单是

[[1]]
     [,1]   [,2]
[1,] "2498" "A" 
[2,] "2346" "B" 
[3,] "2073" "B" 
[4,] "404"  "C" 

将列表平铺到:

"2498", "A" ,"2346" ,"B" ,"2073" ,"B" "404" , "C" 

而不是调用unlist会发生什么:

"2498" "2346" "2073" "404"  "A"    "B"    "B"    "C" 

数据输入

list(structure(c("2498", "2346", "2073", "404", "A", "B", "B", 
"C"), .Dim = c(4L, 2L)))

0 个答案:

没有答案