decimate(x, by=10, to, filter, debug=getOption("oceDebug"))
Arguments
x
an oce object containing a data element.
by
an indication of the subsampling. The first element is
selected, then the 1+by element, etc. This is ignored
if to is given.
to
Indices at which to subsample. If given, this over-rides
by.
filter
optional list of numbers representing a digital filter
to be applied to each variable in x$data before decimation is
done. If not supplied, then the decimation is done strictly by
sub-sampling.
debug
a flag that turns on debugging. Set to 1 to get a
moderate amount of debugging information, or to 2 to get more.
Value
An object of class"oce" that has been
subsampled appropriately.
Details
Later on, other methods will be added, and
ctdDecimate will be retired in favour of this, a more
general, function. The filtering is done with the
filter function of the stats package.
See Also
Filter coefficients may be calculated using
makeFilter. (Note that ctdDecimate will be
retired when the present function gains equivalent functionality.)