Description Usage Arguments Value Examples
Adds rows to the input data table to include any combinations
of .x
and .y
that are not already present. All other
columns (if any) are set to NA
1 | bind_missing_combs(df, .x, .y)
|
df |
input data table |
.x, .y |
names of the columns for which to add missing comparisons |
a data table with the new rows
1 2 3 4 5 6 7 8 9 | df <- data.frame(
a = c("A", "B"),
b = c("C", "A"),
untouched = c(1, 2),
stringsAsFactors = FALSE
)
df
bind_missing_combs(df, a, b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.