bind_both_table.Rd
This function joins two summarized dataframes and relocates y_left before y_right. The function also sets the VIS_Groep value to 'left' for the right dataframe.
bind_both_table(dfLeft_summ, dfRight_summ, y_left, y_right)
A summarized dataframe to be joined
A summarized dataframe to be joined
A character vector specifying the column to be relocated before y_right
A character vector specifying the column after which y_left will be relocated
A dataframe obtained by joining dfLeft_summ and dfRight_summ, with y_left relocated before y_right
df1 <- data.frame(
VIS_Groep = "a",
x = c("a", "b"),
y1 = 1:2
)
df2 <- data.frame(
VIS_Groep = "b",
x = c("a", "b"),
y2 = 3:4
)
df_both <- bind_both_table(df1, df2, "y1", "y2")
#> Joining with `by = join_by(VIS_Groep, x)`