The R Project SVN R

Rev

Rev 3049 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

\name{interaction}
\title{Compute Factor Interactions}
\usage{
interaction(..., drop=FALSE)
}
\alias{interaction}
\arguments{
 \item{\dots}{The factors for which interaction is to be computed.}
 \item{drop}{If \code{drop} is \code{TRUE}, empty factor levels
      are dropped from the result. The default is to retain all
      factor levels.}
}
\description{
\code{interaction} computes a factor which represents the interaction
of the given factors.  The result of \code{interaction} is always unordered.
}
\value{
A factor which represents the interaction of the given factors.
}

\seealso{
\code{\link{factor}}.
}

\examples{
a <- gl(2, 2, 8)
b <- gl(2, 4, 8)
interaction(a, b)
}
\keyword{category}