I have a dataset that look like this:
I would like to combine those two datasets. How can I do that. I can't use rbind
as df has more vars.
Sample data can be build using codes:
df<-structure(list(ID = c(1, 2, 3), High = c(25, 36, 75), weight = c(38,
58, 36), date = c(1, 1, 1)), row.names = c(NA, -3L), class = c("tbl_df",
"tbl", "data.frame"))
df2<-structure(list(ID = c(1, 2, 3, 1, 2, 3), weight = c(69, 58, 35,
65, 24, 15), date = c(3, 3, 3, 2, 2, 2)), row.names = c(NA, -6L
), class = c("tbl_df", "tbl", "data.frame"))