interaction computes a factor which represents the interaction
of the given factors. The result of
interaction is always unordered.
the factors for which interaction is to be computed, or a single list giving those factors.
string to construct the new level labels by joining the constituent ones.
logical indicating if the order of factor concatenation should be lexically ordered.
A factor which represents the interaction of the given factors.
The levels are labelled as the levels of the individual factors joined
sep which is
. by default.
By default, when
lex.order = FALSE, the levels are ordered so
the level of the first factor varies fastest, then the second and so
on. This is the reverse of lexicographic ordering (which you can get
lex.order = TRUE), and differs from
:. (It is done this way for compatibility with S.)
Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole.
f:g is similar to
interaction(f, g, sep = ":") when
g are factors.
1 2 3 4 5 6 7 8 9
We want your feedback!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.