\HeaderA{AsIs}{Inhibit Interpretation/Conversion of Objects}{AsIs}
\aliasA{I}{AsIs}{I}
\aliasA{print.AsIs}{AsIs}{print.AsIs}
\aliasA{[.AsIs}{AsIs}{[.AsIs}
\keyword{models}{AsIs}
\begin{Description}\relax
Change the class of an object to indicate that it should be treated
\sQuote{as is}.
\end{Description}
\begin{Usage}
\begin{verbatim}
I(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Function \code{I} has two main uses.
\Itemize{
\item In function \code{\LinkA{data.frame}{data.frame}}.  Protecting an object by
enclosing it in \code{I()} in a call to \code{data.frame} inhibits the
conversion of character vectors to factors and the dropping of
names, and ensures that matrices are inserted as single columns.
\code{I} can also be used to protect objects which are to be
added to a data frame, or converted to a data frame \emph{via}
\code{\LinkA{as.data.frame}{as.data.frame}}.

It achieves this by prepending the class \code{"AsIs"} to the object's
classes.  Class \code{"AsIs"} has a few of its own methods, including
for \code{[}, \code{as.data.frame}, \code{print} and \code{format}.

\item In function \code{\LinkA{formula}{formula}}.  There it is used to
inhibit the interpretation of  operators such as \code{"+"},
\code{"-"}, \code{"*"} and \code{"\textasciicircum{}"} as formula operators, so they
are used as arithmetical operators.  This is interpreted as a symbol
by \code{terms.formula}.
}
\end{Details}
\begin{Value}
A copy of the object with class \code{"AsIs"} prepended to the class(es).
\end{Value}
\begin{References}\relax
Chambers, J. M. (1992)
\emph{Linear models.}
Chapter 4 of \emph{Statistical Models in S}
eds J. M. Chambers and T. J. Hastie, Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{data.frame}{data.frame}}, \code{\LinkA{formula}{formula}}
\end{SeeAlso}

