powered by
Construct a product of factors.
cross(..., sep = ":", drop.unused.levels = FALSE)
a factor
factors to be crossed.
separator between levels
should levels that do not appear in cross product be dropped?
x <- letters[1:3] y <- c(1,2,1,1,3,1,3) cross(x, y) cross(x, y, drop.unused.levels=TRUE)
Run the code above in your browser using DataLab