I have two dataframes that look like this:
df_1 <- tibble(id = c(1,1,2,2,3,3), y = c("a", "b", "a", "b","a", "b"))
df_2 <- tibble(id = c(1,1,3,3), z = c(4,5,6,5))
I want to merge the two dfs such that it looks like this:
df_3 <- tibble(id = c(1,1,2,2,3,3), y = c("a", "b", "a", "b","a", "b"), z = c(4,5,NA,NA,6,5))
How may I do this in R? Thank you!