Description Usage Arguments Value Changes Author(s) References See Also Examples
View source: R/invinteraction.R
Inverse of interaction
1 | invinteraction(fac, ..., sep = ".")
|
fac |
the factor to split |
... |
optional, names for variables |
sep |
the seperator between levels |
a data.frame of factors
Refactored to process the levels vector, rather than entire factor vector.
42, Neal Fultz
http://stackoverflow.com/a/10521926/986793
1 2 3 4 5 6 7 8 9 | f1 <- gl(2, 3)
f2 <- gl(3, 2)
invinteraction(f1:f2, sep=':')
ppl <- interaction(
eyes = as.factor(sample(colors(), 10)),
hair = as.factor(sample(colors(), 10))
)
str(invinteraction(ppl, "eyes", "hair"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.