我正在尝试合并两个表。每个月我都会收到新数据。将新数据添加到现有数据框对我来说很方便。我不寻求合并它们,因为它们是相同的变量。
一个小例子如下: M 和 N 具有相同的维度。我想将 M 和 N 结合在一起
提前致谢
M <- structure(list(ID= c(56L, 67L, 68L, 73L, 77L, 87L), Mary = c(73L,
82L, 80L, 78L, 79L, 80L), Dave = c(45L, 42L, 51L, 46L, 60L, 54L
), Anne = c(78L, 85L, 92L, 83L, 77L, 89L), Bob = c(51L, 49L,
58L, 54L, 62L, 68L)), .Names = c("ID", "Mary", "Dave", "Anne",
"Bob"), class = "data.frame", row.names = c(NA, -6L))
N <- structure(list(ID= c(53L, 22L, 21L, 73L, 727L, 27L), Mary = c(72L,
82L, 80L, 78L, 79L, 80L), Dave = c(45L, 42L, 51L, 46L, 62L, 54L
), Anne = c(78L, 85L, 92L, 22L, 77L, 89L), Bob = c(52L, 49L,
58L, 54L, 62L, 628L)), .Names = c("ID", "Mary", "Dave", "Anne",
"Bob"), class = "data.frame", row.names = c(NA, -6L))