series
is a base class representing ordered data objects
such as time series and signals, which have
positions (x values, times), and for each position a set of variables
(stored in any rectangular data object). There are two
built-in extending classes of
series
,
timeSeries
and
signalSeries
.
seriesVirtual
is a virtual class
corresponding to
series
; all the
series
methods are actually
defined on the
seriesVirtual
class so that they can be inherited easily
by extending classes (which should include both
series
and
seriesVirtual
in their representations).
is.rectangular
is
T
, such as a
data.frame
,
matrix
, or
atomic vector.
positions
) the x values for the variables.
positions
) the starting x value.
positions
) the ending x value.
positions
) future x values used for predictions.
character
) units for the data.
character
) title of the data set.
character
) user-supplied documentation.
ANY
) attributes slot for arbitrary use.
The
series
class holds x positions and variable data,
and is valid only when the lengths of the positions and data match,
and when the data slot is a rectangular object.
It is not really meant to be used directly; instead most users will want
to use the
signalSeries
and
timeSeries
classes. All of the methods
for
series
objects are defined on the corresponding virtual
seriesVirtual
class. Extending classes
should include both
series
and
seriesVirtual
in their representations.
The
series
class has a validity function,
seriesValid
. There
are access functions called
positions
and
seriesData
that access the positions and data in the object, and that
can also be used on the left side of assignments.
There are also methods defined for
series
objects for the
following functions:
nrow
,
ncol
,
start
,
end
, subscripting,
the standard rectangular data functions (see
is.rectangular
),
and basic arithmetic.