{
# load data
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"))
# create spectrograms
spectrograms(lbh_selec_table[1:5, ], path = tempdir(), pb = FALSE)
# create folder to move image files
dir.create(file.path(tempdir(), "imgs"))
# copy files
move_images(cut = FALSE, from = tempdir(), to = file.path(tempdir(), "imgs"))
# cut files
move_images(
cut = TRUE, from = tempdir(),
to = file.path(tempdir(), "imgs"), overwrite = TRUE
)
# Check this folder
file.path(tempdir(), "imgs")
}
Run the code above in your browser using DataLab