Trace methodThe RMS amplitude of a single Trace is calculated as:
$$rms(x) = \sqrt{ \frac{\sum_1^n{(x_i)^2}}{n} }$$
The RMS variance of a single Trace is calculated as:
$$rmsVariance(x) = \sqrt{ \frac{\sum_1^n{(x_i - \bar{x})^2}}{n} }$$
where $x$ is the vector of data values and $n$ is the length of that vector.
Stream methods
For Stream objects, data from all Traces in the stream
are first extracted and concatenated into a single numeric vector after which the
algorithm is applied.
The parallel~ version of this method is only available on Stream objects
and returns a vector of values, one for each Trace.
By default, the parallel~ versions of these methods use na.rm=FALSE as there
should be no missing datapoints in each Trace. The single-vector methods default to
na.rm=TRUE to accommodate merged traces where gaps between traces have been
filled with NAs.