cross {mosaic} | R 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)
[Package mosaic version 1.9.1 Index]