catalog2pdf {warbleR} | R Documentation |
Combine catalog
images into pdfs
Description
catalog2pdf
combines catalog
jpeg images into pdfs
Usage
catalog2pdf(keep.img = TRUE, overwrite = FALSE, parallel = 1, path = NULL,
pb = TRUE, by.img.suffix = FALSE, ...)
Arguments
keep.img |
Logical argument. Indicates whether jpeg files should be kept (default) or remove. |
overwrite |
Logical argument. If |
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). |
path |
Character string containing the directory path where the catalog image files are located.
If |
pb |
Logical argument to control progress bar. Default is |
by.img.suffix |
Logical. If |
... |
Additional arguments to be passed to the internal pdf creating function |
Details
The function combines catalog images in .jpeg format from the catalog
function into pdfs. Images must be saved in .jpeg format. Note that using lower resolution and smaller dimension (width and height) when creating catalogs will substantially decrease the size of pdf files (which could be pretty big).
Value
Image files in pdf format with spectrogram catalogs in the working directory.
Author(s)
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr)
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
Examples
## Not run:
# save sound file examples
data(list = c("Phae.long1", "Phae.long2"))
writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav"))
writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav"))
catalog(X = lbh_selec_table, nrow = 2, ncol = 4)
# now create single pdf removing jpeg
catalog2pdf(keep.img = FALSE, path = tempdir())
# check this floder
tempdir()
## End(Not run)