Learn R Programming

warbleR (version 1.1.32)

inflections: Count number of inflections in a frequency contour

Description

inflections counts the number of inflections in a frequency contour (or any time series)

Usage

inflections(X = NULL, parallel = 1, pb = TRUE)

Value

A data frame with 3 columns: "sound.files", "selec" and "infls" (number of inflections).

Arguments

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 TRUE.

Author

Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr)

Details

The function counts the number of inflections in a frequency contour.

References

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.

See Also

freq_ts, track_freq_contour, gaps

Examples

Run this code
{
# 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)
}

Run the code above in your browser using DataLab