Learn R Programming

warbleR (version 1.1.17)

wav_info: Get wave file parameter information

Description

wav_info is a wrapper for selection_table that returns wave file information

Usage

wav_info(path = NULL, parallel = 1, pb = TRUE)

Arguments

path

Character string containing the directory path where the sound files are located. If NULL (default) then the current working directory is used.

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.

Value

A data frame with descriptive information about the wave files in the working directory (or 'path'). See "details".

Details

This function is a wrapper for selection_table that returns a data frame with the following descriptive parameters for each wave file in the working directory (or 'path'):

  • duration: duration of selection in seconds

  • sample.rate: sampling rate in kHz

  • channels: number of channels

  • bits: bit depth

  • wav.size: wave file size in MB

  • samples: number of samples in the sound file

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

fixwavs, selection_table & checksels

Examples

Run this code
# NOT RUN {
{
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"))
 
#get info
wav_info(path = tempdir())
}

# }

Run the code above in your browser using DataLab