Description Usage Arguments Value Examples
Add rows to df
to complete all combinations of
columns .x
and .y
. Importantly, this function observes and
maintains any groups created by dplyr::group_by()
.
1 | add_missing_combinations(df, .x, .y)
|
df |
a data frame (or tibble) object |
.x, .y |
column names to make combinations of |
a data frame (or tibble) with additional columns
1 2 3 4 5 6 7 8 | df <- data.frame(
a = c("A", "B"),
b = c("C", "D"),
untouched = c(1, 2)
)
df
add_missing_combinations(df, a, b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.