multiplyBy | R Documentation |
The multiplyBy
methods of Trace
and Stream
objects return like objects
where all @data
slots have been multiplied by a constant.
multiplyBy(x, y)
x |
a |
y |
a numeric multiplier |
A new Trace
or Stream
object is returned.
Jonathan Callahan jonathan@mazamascience.com
## Not run: # Open a connection to IRIS DMC webservices iris <- new("IrisClient") starttime <- as.POSIXct("2011-01-24", tz="GMT") endtime <- as.POSIXct("2011-01-25", tz="GMT") # Get the waveform stRaw <- getDataselect(iris,"AK","PIN","","BHZ",starttime,endtime) # obtain an instrument sensitivity value with getChannel metadata) c <- getChannel(iris, "AK","PIN","","BHZ",starttime, endtime) sensitivityValue <- c$scale # convert raw data st <- multiplyBy(stRaw, 1/sensitivityValue) rmsVariance(st) # plot trace plot(st, ylab=c$scaleunits) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.