cross: Factor cross products

View source: R/cross.R

crossR Documentation

Factor cross products

Description

Construct a product of factors.

Usage

cross(..., sep = ":", drop.unused.levels = FALSE)

Arguments

...

factors to be crossed.

sep

separator between levels

drop.unused.levels

should levels that do not appear in cross product be dropped?

Value

a factor

Examples

x <- letters[1:3]
y <- c(1,2,1,1,3,1,3)
cross(x, y)
cross(x, y, drop.unused.levels=TRUE)


mosaic documentation built on May 29, 2024, 5:27 a.m.