crossing: Create a data.table from all unique combinations of inputs

View source: R/crossing.R

crossingR Documentation

Create a data.table from all unique combinations of inputs

Description

crossing() is similar to expand_grid() but de-duplicates and sorts its inputs.

Usage

crossing(..., .name_repair = "check_unique")

Arguments

...

Variables to get unique combinations of

.name_repair

Treatment of problematic names. See ?vctrs::vec_as_names for options/details

Examples

x <- 1:2
y <- 1:2

crossing(x, y)

crossing(stuff = x, y)

tidytable documentation built on Sept. 11, 2024, 8:05 p.m.