# import 38 and 120 kHz data from an HAC file
hacfile <- system.file("hac", "D20150510-T202500.hac", package = "echogram")
echo2.038 <- read.echogram(hacfile, channel = 1)
echo2.120 <- read.echogram(hacfile, channel = 2)
# plot 38 kHz echogram
echogram(echo2.038)
if (FALSE) {
# select points coordinates with the mouse
# click to select several locations and escape when done
pts038 <- sample.echogram(echo2.038)
pts038
# plot 120 kHz echogram
echogram(echo2.120)
# use the points previously selected for 38 kHz
pts120 <- sample.echogram(echo2.120, coords = pts038[ , 2:3])
pts120
}
Run the code above in your browser using DataLab