View source: R/info_sound_files.R
info_sound_files | R Documentation |
info_sound_files
summariz sound file information
info_sound_files(
path = NULL,
files = NULL,
parallel = 1,
pb = TRUE,
skip.error = FALSE,
file.format = "\\.wav$|\\.wac$|\\.mp3$|\\.flac$"
)
path |
Character string containing the directory path where the sound files are located.
If |
files |
character vector indicating the set of files that will be consolidated. File names should not include the full file path. Optional. |
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 |
skip.error |
Logical to control if errors are omitted. If so, files that could not be read will be excluded and their name printed in the console. Default is |
file.format |
Character string with the format of sound files. By default all sound file formats supported by warbleR are included ("\\.wav$|\\.wac$|\\.mp3$|\\.flac$"). Note that several formats can be included using regular expression syntax as in |
This function is a wrapper for selection_table
that returns a data frame with the following descriptive parameters for each sound 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
: sound file size in MB
samples
: number of samples in the sound file
A data frame with descriptive information about the sound files in the working directory (or 'path'). See "details".
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.
fix_wavs
, selection_table
& check_sels
{
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
info_sound_files(path = tempdir())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.