expand.grid2: A new version of an old favorite with some extra options

Description Usage Arguments

View source: R/utilities.R

Description

expand.grid2() creates a combination data frame from vectors or lists but differs from the original expand.grid() in that it has two options for removing two different type of duplicates. stringsAsFactors is set to TRUE.

Usage

1
expand.grid2(..., rm.dupes = TRUE, rm.dubs = TRUE)

Arguments

...

Vectors to be expanded.

rm.dupes

Removes duplicated "rows". If TRUE (default) then rows that are unordered duplicates of other rows will be removed. i.e. c("A", "B", "C") is the same as c("C", "B", "A") and any other combination of "A", "B", and "C".

rm.dubs

Removes a row in which all elements are the same. If TRUE (default) then a row such as c("A", "A", "A") will be removed.


ggloop documentation built on May 2, 2019, 3:01 a.m.