{
# load warbleR for sound file examples
library(NatureSounds)
#load data
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "selection_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)
# save 'Raven' selection tables in the temporary directory
out <- lapply(1:2, function(x)
writeLines(selection_files[[x]], con = file.path(tempdir(), names(selection_files)[x])))
# try drag and drop selection files into Raven (shouldn't work)
# now fix files
fix_path(path = tempdir(),
sound.file.col = "Begin File", new.begin.path = "YOUR NEW LOCATION HERE")
# try drag and drop into Raven again (should work now)
}
Run the code above in your browser using DataLab