cross | R Documentation |
Construct a product of factors.
cross(..., sep = ":", drop.unused.levels = FALSE)
... |
factors to be crossed. |
sep |
separator between levels |
drop.unused.levels |
should levels that do not appear in cross product be dropped? |
a factor
x <- letters[1:3]
y <- c(1,2,1,1,3,1,3)
cross(x, y)
cross(x, y, drop.unused.levels=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.