View source: R/exp_empty_sels.R
exp_empty_sels | R Documentation |
exp_empty_sels
exports a 'Raven' selection data in .txt format that includes empty selections for all sound files in a folder.
exp_empty_sels(path = NULL, file.name = NULL, sound.files = NULL, pb = TRUE)
path |
A character string indicating the path of the directory in which to look for sound files. If not provided (default) the function will use the current working directory. |
file.name |
Name of the output .txt file. If |
sound.files |
character vector indicating the sound files that will be included. If |
pb |
Logical argument to control progress bar. Default is |
The function saves a selection file in '.txt' format (that can be directly opened in Raven) that will display all sound files in the provided directory (argument 'path'). Useful to simplify the making of selections from several sound files that need to be displayed simultaneously (e.g. several recordings from the same individual). The selection file is saved in the provided directory ('path').
The function saves a selection table in '.txt' format that can be directly opened in Raven. No objects are returned in the R environment.
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr)
exp_raven
# Load data
library(NatureSounds)
library(warbleR)
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "lbh_selec_table"))
## Export a single selection table including multiple files
#save sound files
tuneR::writeWave(Phae.long1, file.path(tempdir(),
"Phae.long1.wav"), extensible = FALSE)
tuneR::writeWave(Phae.long2, file.path(tempdir(),
"Phae.long2.wav"), extensible = FALSE)
tuneR::writeWave(Phae.long3, file.path(tempdir(),
"Phae.long3.wav"), extensible = FALSE)
tuneR::writeWave(Phae.long4, file.path(tempdir(),
"Phae.long4.wav"), extensible = FALSE)
# export with no file name
exp_empty_sels(path = tempdir())
# export with file name
exp_empty_sels(file.name = "Phaethornis.longirostris", path = tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.