M {seewave} | R Documentation |
Median of the amplitude envelope
Description
This function computes an acoustic index based on the median of the amplitude envelope.
Usage
M(wave, f, channel = 1, envt = "hil", plot = FALSE, ...)
Arguments
wave |
an |
f |
sampling frequency of wave (in Hz). Does not need to be
specified if embedded in |
channel |
channel of the R object, by default left channel (1). |
envt |
the type of envelope to be used: either |
plot |
logical, if TRUE returns a plot of the amplitude envelope of wave (by default |
... |
other env parameters, in particular smoothing parameters. See |
Details
This amplitude index M is computed according to:
M = \bar{A}(t) \times 2^{1-depth}
with
0 \leq M \leq 1
where A(t) is the amplitude envelope and depth is the signal digitization depth in number of bits.
Value
A numeric vector of length 1 between 0 and 1, without unit.
Author(s)
Jerome Sueur and Marion Depraetere
References
Depraetere M, Pavoine S, Jiguet F, Gasc A, Duvail S, Sueur J (2012) Monitoring animal diversity using acoustic indices: implementation in a temperate woodland. Ecological Indicators, 13, 46-54.
See Also
Examples
data(tico)
M(tico)
# smoothing the amplitude may change slightly the result
M(tico, msmooth=c(500,50), plot=TRUE)