.BG
.VE $Header: /usr3/s/current/s/.help/RCS/structure,v 1.2 83/12/30 19:35:06 rab Exp $
.FN structure
.TL
structure: S Data Structures
.PP
S provides both general hierarchical data structures and automatic
handling of commonly occurring statistical data.
.IP Vector
may be of mode LGL (logical), INT, REAL or CHAR. The last
may not be used for numerical data.
Each element of a CHAR vector is a string.
.IP Vector structure
may be either a vector or a structure with one of its
entries a vector named `Data'.  The two most
important examples are TS (time-series) and ARRAY,
including matrices.
.IP Numeric structure
vector structure, except one for which the `Data' entry is of mode
CHAR.
.IP General structure
consists of an arbitrary set of components,
each of which may be a vector, a vector structure, or a general
structure.  The components have names, so that one may refer
to them by their component names (see `select').
.EX
i <- 1:10; x <- i**.5; t <- "abc"
j <- cstr(Data=1:10,t="abc")
k <- cstr(first=j,second=x); m <- cstr(first=i,second=x)
.ft 1
(`i', `x' and `t' are vectors; `j' is numeric; `k' and `m' are general,
but not numeric: `k' has a `Data', but 2 levels down; `m' has no `Data'.)
.KW special
.KW structure
.KW data
.KW builtin
.WR
