\Header{logical}{Logical Vectors}
\alias{as.logical}{logical}
\methalias{as.logical.default}{logical}
\alias{F}{logical}
\alias{FALSE}{logical}
\alias{is.logical}{logical}
\alias{T}{logical}
\alias{TRUE}{logical}
\keyword{classes}{logical}
\keyword{logic}{logical}
\begin{Description}\relax
Create or test for objects of type \code{"logical"}, and the basic
logical ``constants''.\end{Description}
\begin{Usage}
\begin{verbatim}
TRUE
FALSE
T; F

logical(length = 0)
as.logical(x, ...)
is.logical(x)
\end{verbatim}
\end{Usage}
\begin{Details}\relax
\code{TRUE} and \code{FALSE} are part of the \R{} language, where
\code{T} and \code{F} are global variables set to these.
All four are \code{logical(1)} vectors.\end{Details}
\begin{Value}
\code{logical} creates a logical vector of the specified length.
Each element of the vector is equal to \code{FALSE}.

\code{as.logical} attempts to coerce its argument to be of logical
type.  For \code{\Link{factor}}s, this uses the \code{\Link{levels}}
(labels) and not the \code{\Link{codes}}.

\code{is.logical} returns \code{TRUE} or \code{FALSE} depending on
whether its argument is of logical type or not.\end{Value}

