#First create empty folder
dir.create(file.path(getwd(),"temp"))
setwd(file.path(getwd(),"temp"))
#load data
data(list = c("Phae.long1", "Phae.long2"))
data(manualoc.df)
writeWave(Phae.long2, "Phae.long2.wav") #save sound files
writeWave(Phae.long1, "Phae.long1.wav")
# make spectrograms
trackfreqs(manualoc.df, flim = c(0, 14), inner.mar = c(4,4.5,2,1), outer.mar = c(4,2,2,1),
picsize = 2, res = 300, cexlab = 2, bp = c(0, 14), cex = c(1.5, 2),
col = c("blue", "red"), mar = 0.09, lpos = "bottomright", it = "jpeg")
# make only Phae.long1 spectrograms
trackfreqs(manualoc.df[manualoc.df$sound.files == "Phae.long1.wav", ], flim = c(3, 14),
inner.mar = c(4,4.5,2,1), outer.mar = c(4,2,2,1), picsize = 2, res = 300, cexlab = 2,
bp = c(3, 14), cex = c(1.5, 2), col = c("blue", "red"), mar = 0.09,
lpos = "bottomright", it = "tiff")
# remove example directory
unlink(getwd(),recursive = TRUE)
Run the code above in your browser using DataLab