interaction {base} | R Documentation |
Compute Factor Interactions
Description
interaction
computes a factor which represents the interaction
of the given factors. The result of interaction
is always unordered.
Usage
interaction(..., drop=FALSE)
Arguments
... |
The factors for which interaction is to be computed. |
drop |
If |
Value
A factor which represents the interaction of the given factors.
See Also
factor
.
Examples
a <- gl(2, 2, 8)
b <- gl(2, 4, 8)
interaction(a, b)