# NOT RUN {
# First set empty folder
# setwd(tempdir())
data(list = c("Phae.long1", "selec.table"))
writeWave(Phae.long1, "Phae.long1.wav") #save sound files
# subset selection table
st <- selec.table[selec.table$sound.files == "Phae.long1.wav",]
# read wave file as an R object
sgnl <- tuneR::readWave(as.character(st$sound.files[1]))
# create color column
st$colors <- c("red2", "blue", "green")
# highlight selections
color.spectro(wave = sgnl, wl = 300, ovlp = 90, flim = c(1, 8.6), collevels = seq(-90, 0, 5),
dB = "B", X = st, col.clm = "colors", base.col = "skyblue", t.mar = 0.07, f.mar = 0.1,
interactive = NULL)
# interactive (selected manually: you have to select them by clicking on the spectrogram)
color.spectro(wave = sgnl, wl = 300, ovlp = 90, flim = c(1, 8.6), collevels = seq(-90, 0, 5),
dB = "B", col.clm = "colors", t.mar = 0.07, f.mar = 1, interactive = 2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab