Learn R Programming

echogram (version 0.1.3)

trim.echogram: Trim an echogram vertically or horizontally

Description

This function allows to trim an echogram by depth or ping number by actually trimming the underlying data matrices and vectors.

Usage

trim.echogram(echogram, depth.max = NULL, ping.ini = 1, ping.end = NULL)

Value

An object of class ``echogram''.

Arguments

echogram

an object of class ``echogram'' as returned by read.echogram.

depth.max

maximum depth to keep in the echogram.

ping.ini

start ping to keep.

ping.end

end ping to keep.

Author

Héctor Villalobos

Details

This funcion has been conceived to discard undesired data below a given depth (e.g. the sea bottom), therefore, the initial depth is always the surface, so the vertical trimming is limited to select the maximum depth.

Examples

Run this code
# import 38 kHz data from an HAC file 
hacfile <- system.file("hac", "D20150510-T202500.hac", package = "echogram")
echo2.038 <- read.echogram(hacfile, channel = 1)

# echogram by default
echogram(echo2.038)

# trim the echogram
echo.tmp <- trim.echogram(echo2.038, depth.max = 70, ping.end = 250)
echogram(echo.tmp)

Run the code above in your browser using DataLab