interaction
that adds
the parameters
sep
and
left
.
interaction(..., drop=FALSE, sep=".", left=FALSE)
interaction
can be either a data frame containing
all the factors to be used
all the individual factors.
It will not understand a combination of factors and designs as arguments;
you have to pick one form or the other.
TRUE
the levels of the new factor not represented in the data are dropped.
TRUE
to left-justify factor levels when constructing label strings
This is a slight modification of the S-supplied function. The
sep
argument
has been added, a sort step has been added to properly sort the levels of
the created variable, and the
left
parameter is added.
drop =TRUE
, only the levels represented in the
new factor are retained.
Temp <- c(160, 180, 160, 180, 160, 180, 160, 180) Conc <- c(20, 20, 40, 40, 20, 20, 40, 40) interaction(Temp, Conc)