【发布时间】:2021-02-13 10:01:36
【问题描述】:
我想将df1和df2逐行绑定,保持相同的列名,得到df3。
library(tidyverse)
df1 <- tibble(a = c(1, 2, 3),
b = c(4, 5, 6),
c = c(1, 5, 7))
df2 <- tibble(a = c(8, 9),
b = c(5, 6))
# how to bind these tibbles by row to get
df3 <- tibble(a = c(1, 2, 3, 8, 9),
b = c(4, 5, 6, 5, 6),
c = c(1, 5, 7, NA, NA))
由 reprex 包于 2020-10-30 创建 (v0.3.0)
【问题讨论】: