I have the following tables:
df <- data.frame(DATE = c('07/01/2022', '08/01/2022'),
`0` = c(4, 4),
`1` = c(5, 3),
`2` = c(5,3), check.names = FALSE)
Date | 0 | 1 | 2 |
---|---|---|---|
07/01/2022 | 4 | 5 | 5 |
08/01/2022 | 4 | 3 | 3 |
df2 <- data.frame(V1 = 2,
V2 = 4,
V3 = 5)
V1 | V2 | V3 |
---|---|---|
2 | 4 | 5 |
I'm trying to add the values of V1, V2, and V3 below the last row of the first table, but only for columns 0:3. The output should look like this:
Date | 0 | 1 | 1 |
---|---|---|---|
07/01/2022 | 4 | 5 | 5 |
08/01/2022 | 4 | 3 | 3 |
2 | 4 | 5 |
I tried rbind and bind_rows, but neither worked.