\HeaderA{StructureClasses}{Classes Corresponding to Basic Structures}{StructureClasses}
\aliasA{array-class}{StructureClasses}{array.Rdash.class}
\aliasA{Math,structure-method}{StructureClasses}{Math,structure.Rdash.method}
\aliasA{matrix-class}{StructureClasses}{matrix.Rdash.class}
\aliasA{Ops,array,array-method}{StructureClasses}{Ops,array,array.Rdash.method}
\aliasA{Ops,array,structure-method}{StructureClasses}{Ops,array,structure.Rdash.method}
\aliasA{Ops,structure,array-method}{StructureClasses}{Ops,structure,array.Rdash.method}
\aliasA{Ops,structure,structure-method}{StructureClasses}{Ops,structure,structure.Rdash.method}
\aliasA{Ops,structure,vector-method}{StructureClasses}{Ops,structure,vector.Rdash.method}
\aliasA{Ops,vector,structure-method}{StructureClasses}{Ops,vector,structure.Rdash.method}
\aliasA{structure-class}{StructureClasses}{structure.Rdash.class}
\aliasA{ts-class}{StructureClasses}{ts.Rdash.class}
\keyword{classes}{StructureClasses}
\begin{Description}\relax
The virtual class \code{structure} and classes that
extend it are formal classes analogous to S language structures such
as arrays and time-series.
\end{Description}
\begin{Usage}
\begin{verbatim}
## The following class names can appear in method signatures,
## as the class in as() and is() expressions, and, except for
## the classes commented as VIRTUAL, in calls to new()

"matrix"
"array"
"ts"

"structure" ## VIRTUAL
\end{verbatim}
\end{Usage}
\begin{Section}{Objects from the Classes}
Objects can be created by calls of the form \code{new(Class, ...)},
where \code{Class} is the quoted name of the specific class (e.g.,
\code{"matrix"}), and the other arguments, if any, are interpreted as
arguments to the corresponding function, e.g., to function
\code{matrix()}.  There is no particular advantage over calling those
functions directly, unless you are writing software designed to work
for multiple classes, perhaps with the class name and the arguments
passed in.
\end{Section}
\begin{Section}{Extends}
The specific classes all extend class \code{"structure"}, directly, and
class \code{"vector"}, by class \code{"structure"}.
\end{Section}
\begin{Section}{Methods}
\describe{
\item[coerce] Methods are defined to coerce arbitrary objects to
these classes, by calling the corresponding basic function, for
example, \code{as(x, "matrix")} calls \code{as.matrix(x)}.
\item[Ops, Math] Group methods (see, e.g., \code{\LinkA{S4groupGeneric}{S4groupGeneric}})
are defined for combinations of structures and vectors (including
special cases for array and matrix), implementing the concept of
vector structures as in the reference.

}
\end{Section}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{Examples}
\begin{ExampleCode}
showClass("structure")

## explore a bit :
showClass("ts")
(ts0 <- new("ts"))
str(ts0)

showMethods("Ops") # six methods from these classes, but maybe many more
\end{ExampleCode}
\end{Examples}

