# NOT RUN {
# save sound file examples
data(list = c("Phae.long1", "Phae.long2","lbh_selec_table"))
writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav"))
writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav"))
writeWave(Phae.long3, file.path(tempdir(), "Phae.long3.wav"))
writeWave(Phae.long4, file.path(tempdir(), "Phae.long4.wav"))
catalog(X = lbh_selec_table, flim = c(1, 10), nrow = 4, ncol = 2, same.time.scale = T,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200, gr = FALSE,
orientation = "v", labels = c("sound.files", "selec"), legend = 0,
path = tempdir())
#different time scales and tag palette
catalog(X = lbh_selec_table, flim = c(1, 10), nrow = 4, ncol = 2, same.time.scale = F,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200,
orientation = "v", labels = c("sound.files", "selec"), legend = 0,
tag.pal = list(terrain.colors),
path = tempdir())
#adding tags and changing spectro palette
catalog(X = lbh_selec_table, flim = c(1, 10), nrow = 4, ncol = 2, same.time.scale = F,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200, pal = reverse.heat.colors,
orientation = "v", labels = c("sound.files", "selec"), legend = 1,
tag.pal = list(terrain.colors), tags = "sound.files",
path = tempdir())
#create a bigger selection table
X <- rbind(lbh_selec_table, lbh_selec_table, lbh_selec_table, lbh_selec_table)
X <- rbind(X, X)
#create some simulated labels
X$songtype <- sample(letters[13:15], nrow(X), replace = T)
X$indiv <- sample(letters[1:12], nrow(X), replace = T)
# 12 columns in 5 rows, 2 tags
catalog(X = X, flim = c(1, 10), nrow = 5, ncol = 12, same.time.scale = F,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200,
orientation = "v", labels = c("sound.files", "selec"), legend = 3,
collevels = seq(-65, 0, 5), tag.pal = list(terrain.colors), tags = c("songtype", "indiv"),
path = tempdir())
# with legend
catalog(X = X, flim = c(1, 10), nrow = 5, ncol = 12, same.time.scale = F,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200, gr = FALSE,
orientation = "v", labels = c("sound.files", "selec"), legend = 3,
width = 20, collevels = seq(-65, 0, 5), tag.pal = list(terrain.colors),
tags = c("songtype", "indiv"),
path = tempdir())
# horizontal orientation
catalog(X = X, flim = c(1, 10), nrow = 5, ncol = 12, same.time.scale = F,
ovlp = 90, parallel = 1, mar = 0.01, wl = 200, gr = FALSE,
orientation = "h", labels = c("sound.files", "selec"), legend = 3,
width = 20, collevels = seq(-65, 0, 5), tag.pal = list(terrain.colors),
tags = c("songtype", "indiv"),
path = tempdir())
check this floder
tempdir()
# }
Run the code above in your browser using DataLab