\HeaderA{ScalarObject-class}{Utility classes for length one (scalar) objects}{ScalarObject.Rdash.class}
\aliasA{mkScalar}{ScalarObject-class}{mkScalar}
\aliasA{ScalarCharacter-class}{ScalarObject-class}{ScalarCharacter.Rdash.class}
\aliasA{ScalarInteger-class}{ScalarObject-class}{ScalarInteger.Rdash.class}
\aliasA{ScalarLogical-class}{ScalarObject-class}{ScalarLogical.Rdash.class}
\aliasA{ScalarNumeric-class}{ScalarObject-class}{ScalarNumeric.Rdash.class}
\aliasA{show,ScalarCharacter-method}{ScalarObject-class}{show,ScalarCharacter.Rdash.method}
\aliasA{show,ScalarObject-method}{ScalarObject-class}{show,ScalarObject.Rdash.method}
\keyword{classes}{ScalarObject-class}
\begin{Description}\relax
These classes represent scalar quantities, such as a string or a
number and are useful because they provide their own validity
checking.  The classes \code{ScalarCharacter}, \code{ScalarLogical}, 
\code{ScalarInteger}, and \code{ScalarNumeric} all extend their
respective base vector types and can be used interchangeably (except
they should always have length one).

The \code{mkScalar} factory function provides a convenient way of
creating \code{Scalar<type>} objects (see the examples section below).
\end{Description}
\begin{Usage}
\begin{verbatim}
mkScalar(obj)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] An object of type \code{character}, \code{logical},
\code{integer}, or \code{double}
\end{ldescription}
\end{Arguments}
\begin{Author}\relax
Seth Falcon
\end{Author}
\begin{Examples}
\begin{ExampleCode}
v <- list(mkScalar("a single string"),
          mkScalar(1),
          mkScalar(1L),
          mkScalar(TRUE))
sapply(v, class)
sapply(v, length)
\end{ExampleCode}
\end{Examples}

