Create all combinations of values
Generates all unique combinations of the provided columns or expressions. Supports nesting() to only include combinations present in the data.
df (DataFrame): The
DataFrame.
… (Symbol | Vector | Call):
Specification of columns to expand.
A DataFrame with all combinations.
expand(df, $type, $size)
expand(df, nesting($type, $size))
expand(df, $type, 2010:2012)