Basic statistics on the data in
# length(x) # max(x, ...) mean(x, ...) # median(x, na.rm) # min(x, ...) sd(x, na.rm) parallelLength(x) parallelMax(x, na.rm) parallelMean(x, na.rm) parallelMedian(x, na.rm) parallelMin(x, na.rm) parallelSd(x, na.rm)
a logical specifying whether missing values should be removed
arguments to be passed to underlying methods, e.g. the
x is a
Trace object, methods
sd operate on the
data slot of the
Trace and are
equivalent to, e.g.,
x is a
Stream object, methods
sd are applied to the concatenation of data from every
Trace in the
Stream, treating this as a single data series.
parallel~ versions of these methods are available only on
and return a vector of values, one for each
By default, the
Stream-method versions of these methods use
na.rm=FALSE as there
should be no missing datapoints in each
Trace methods default to
na.rm=TRUE to accommodate merged traces where gaps have been filled with
For the simple statistics, a single numeric value is returned or
NA if the
has no data.
parallel~ versions of these methods, available on
a numeric vector is returned of the same length as
See the R documentation on the respective base functions for further details.
length.Stream method only counts the number of actual data values in the individual
Traces in the
Stream object. Missing values associated with the gaps
Traces are not counted.
Jonathan Callahan email@example.com
## Not run: # Open a connection to IRIS DMC webservices iris <- new("IrisClient") starttime <- as.POSIXct("2012-01-24", tz="GMT") endtime <- as.POSIXct("2012-01-25", tz="GMT") # Get the waveform st <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime) # Get the first trace and generate some statistics tr1 <- st@traces[] length(tr1) max(tr1) mean(tr1) sd(tr1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.