crest | R Documentation |
This function returns the crest factor and localizes the different crest(s).
crest(wave, f, channel = 1, plot = FALSE, col = 2, cex = 3, symbol = "*", ...)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
plot |
if |
col |
color of the symbol indicating the localisation of the crest(s) |
cex |
symbol magnification |
symbol |
symbol indicating the localisation of the crest(s) |
... |
other |
The crest factor of a time series s is calculated according to:
C = \frac{max(s)}{rms(s)}
with rms the root-mean-square (see rms
).
The function returns a list of three items
C |
crest factor |
val |
value of the crest(s) |
loc |
location of the crest(s) |
There might be several crests (maxima) along the time wave but there is a single crest factor.
Jerome Sueur sueur@mnhn.fr
Hartmann, W. M. 1998 Signals, sound and sensation. New York: Springer.
oscillo
, rms
data(tico)
crest(tico, f=22050)
# see the crest location and change the default graphical parameters
crest(tico, f=22050, plot=TRUE, sym="-")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.