mergeTraces | R Documentation |
The mergeTraces
method of Stream
objects returns a new Stream
where all Traces
have been merged into a single Trace
. Gaps between
traces are replaced with values determined by the fillMethod
parameter.
mergeTraces(x, fillMethod)
x |
|
fillMethod |
method to use when filling gaps between |
Available values for fillMethod
include:
fillNA
– gaps are filled with NA
(R's missing value flag)
fillZero
– gaps are filled with 0.0
A new Stream
object containing a single Trace
is returned.
Jonathan Callahan jonathan@mazamascience.com
## Not run: # Open a connection to IRIS DMC webservices iris <- new("IrisClient") starttime <- as.POSIXct("2002-04-20", tz="GMT") endtime <- as.POSIXct("2002-04-21", tz="GMT") st4 <- getDataselect(iris,"US","OXF","","BHZ",starttime,endtime) stm4 <- mergeTraces(st4) # plot merged trace plot(stm4@traces[[1]]) mtext(paste(length(st4@traces),"traces"), side=3, line=0.5, adj=0.05, cex=1.5) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.