inflections | R Documentation |
inflections
counts the number of inflections in a frequency contour (or any time series)
inflections(X = NULL, parallel = 1, pb = TRUE)
X |
data frame with the columns for "sound.files" (sound file name), "selec" (unique identifier for each selection) and columns for each of the frequency values of the contours. No other columns should be included. |
parallel |
Numeric. Controls whether parallel computing is applied. It specifies the number of cores to be used. Default is 1 (i.e. no parallel computing). |
pb |
Logical argument to control progress bar and messages. Default is |
The function counts the number of inflections in a frequency contour.
A data frame with 3 columns: "sound.files", "selec" and "infls" (number of inflections).
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr)
Araya-Salas, M., & Smith-Vidaurre, G. (2017). warbleR: An R package to streamline analysis of animal acoustic signals. Methods in Ecology and Evolution, 8(2), 184-191.
freq_ts
, track_freq_contour
, gaps
{
# get warbleR sound file examples
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "lbh_selec_table"))
writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav"))
writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav"))
writeWave(Phae.long3, file.path(tempdir(), "Phae.long3.wav"))
writeWave(Phae.long4, file.path(tempdir(), "Phae.long4.wav"))
# measure frequency contours
dom.freq.ts <- freq_ts(X = lbh_selec_table, path = tempdir())
# get number of inflections
inflections(X = dom.freq.ts)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.