fac.combine | R Documentation |
Combines several factors
into one whose levels
are the
combinations of the used levels
of the individual factors
.
fac.combine(factors, order="standard", combine.levels=FALSE, sep=",", ...)
factors |
A |
order |
Either |
combine.levels |
A |
sep |
A |
... |
Further arguments passed to the |
A factor
whose levels
are formed form the observed
combinations of the levels
of the individual factors
.
Chris Brien
fac.uncombine
, fac.split
, fac.divide
in package dae.
## set up two factors
A <- factor(rep(1:2, each=6))
B <- factor(rep(1:3, each=2, times=2))
## obtain six-level factor corresponding to the combinations of A and B
AB <- fac.combine(list(A,B))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.