Expand a data.table to use all combinations of values
Generates all combinations of variables found in a dataset.
expand.()
is useful in conjunction with joins:
use with right_join.()
to convert implicit missing values to explicit missing values
use with anti_join.()
to find out which combinations are missing
expand.(.df, ..., .name_repair = "check_unique")
.df |
A data.frame or data.table |
... |
Columns to get combinations of |
.name_repair |
Treatment of duplicate names. See |
test_df <- tidytable(x = 1:2, y = 1:2) test_df %>% expand.(x, y)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.