在一个数据帧中连接多个数据帧列表

时间:2019-02-01 16:48:00

标签: r

我有很多数据框的列表

> Data
[[1]]
       [,1]                    [,2]  [,3] [,4]     [,5]    [,6]     [,7]   [,8]        [,9] [,10]   [,11]               [,12]             
  [1,] "EC_VO"                 ""    ""   "388985" "100"   "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [2,] "DOUBLON"               ""    ""   "0"      "0"     "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [3,] "DIS_CD_MTF"            ""    ""   "235673" "60.59" "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [4,] "DIS_CD_MTF"            "00"  ""   "1114"   "0.29"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"

[[2]]
[1,] "DIS_CD_MTF"            "14"  ""   "94"     "0.02"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [2,] "DIS_CD_MTF"            "17"  ""   "29819"  "7.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [3,] "DIS_CD_MTF"            "21"  ""   "2621"   "0.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [4,] "DIS_CD_MTF"            "23"  ""   "12277"  "3.16"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"

[[3]]
[1,] "DIS_CD_RIS"            "053" ""   "29819"  "7.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [2,] "DIS_CD_RIS"            "054" ""   "13112"  "3.37"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [3,] "DIS_CD_RIS"            "055" ""   "4755"   "1.22"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
 [4,] "DIS_CD_RIS"            "058" ""   "10608"  "2.73"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"

我使用了do.call函数来获得以下结果:

do.call(rbind.data.frame, Data)

   [,1]                    [,2]  [,3] [,4]     [,5]    [,6]     [,7]   [,8]        [,9] [,10]   [,11]               [,12]             
  [1,] "EC_VO"                 ""    ""   "388985" "100"   "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [2,] "DOUBLON"               ""    ""   "0"      "0"     "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [3,] "DIS_CD_MTF"            ""    ""   "235673" "60.59" "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [4,] "DIS_CD_MTF"            "00"  ""   "1114"   "0.29"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [5,] "DIS_CD_MTF"            "14"  ""   "94"     "0.02"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [6,] "DIS_CD_MTF"            "17"  ""   "29819"  "7.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [7,] "DIS_CD_MTF"            "21"  ""   "2621"   "0.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [8,] "DIS_CD_MTF"            "23"  ""   "12277"  "3.16"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [9,] "DIS_CD_RIS"            "053" ""   "29819"  "7.67"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [10,] "DIS_CD_RIS"            "054" ""   "13112"  "3.37"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [11,] "DIS_CD_RIS"            "055" ""   "4755"   "1.22"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"
  [12,] "DIS_CD_RIS"            "058" ""   "10608"  "2.73"  "200701" "1EX4" "PUB_1EEVC" "RE" "1EEVC" "InterfacePublique" "2019-01-17 18:35"

但是我需要不使用do.call函数的结果,因为它非常慢,并且由于我有巨大的数据集而导致错误错误。

有什么主张吗?谢谢

请注意,所有数据帧的长度都不同

0 个答案:

没有答案