\HeaderA{nonStructure-class}{A non-structure S4 Class for basic types}{nonStructure.Rdash.class}
\aliasA{Math,nonStructure-method}{nonStructure-class}{Math,nonStructure.Rdash.method}
\aliasA{Math2,nonStructure-method}{nonStructure-class}{Math2,nonStructure.Rdash.method}
\aliasA{Ops,nonStructure,nonStructure-method}{nonStructure-class}{Ops,nonStructure,nonStructure.Rdash.method}
\aliasA{Ops,nonStructure,vector-method}{nonStructure-class}{Ops,nonStructure,vector.Rdash.method}
\aliasA{Ops,vector,nonStructure-method}{nonStructure-class}{Ops,vector,nonStructure.Rdash.method}
\keyword{classes}{nonStructure-class}
\begin{Description}\relax
S4 classes that are defined to extend one of the basic
vector classes should contain the class
\code{\LinkA{structure}{structure.Rdash.class}} if they behave like structures; that
is, if they should retain their class behavior under math functions
or operators, so long as their length is unchanged.
On the other hand, if their class depends on the values in the
object, not just its structure, then they should lose that class
under any such transformations.  In the latter case, they should be
defined to contain \code{nonStructure}.

If neither of these strategies applies, the class likely needs some
methods of its own for \code{\bsl{}linkk\{Ops\}}, \code{\LinkA{Math}{Math}}, and/or
other generic functions. What is not usually a good idea is to allow
such computations to drop down to the default, base code.  This is
inconsistent with most definitions of such classes.
\end{Description}
\begin{Section}{Methods}
Methods are defined for operators and math functions (groups
\code{\bsl{}linkk\{Ops\}}, \code{\LinkA{Math}{Math}} and  \code{\LinkA{Math2}{Math2}}.  In
all cases the result is an ordinary vector of the appropriate type.
\end{Section}
\begin{References}\relax
Chambers, John M. (2008)
\emph{Software for Data Analysis: Programming with R}
Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{structure}{structure.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
setClass("NumericNotStructure", contains = c("numeric","nonStructure"))
xx <- new("NumericNotStructure", 1:10)
xx + 1 # vector
log(xx) # vector
sample(xx) # vector

\end{ExampleCode}
\end{Examples}

