removeCalibration: Remove a Calibration Function from a PAMpalSettings Object

View source: R/removeCalibration.R

removeCalibrationR Documentation

Remove a Calibration Function from a PAMpalSettings Object

Description

Remove a calibration function from the "calibration" slot of a PAMpalSettings object

Usage

removeCalibration(pps, index = NULL, module = "ClickDetector", verbose = TRUE)

Arguments

pps

a PAMpalSettings object to remove a calibration from

index

index of the calibration function to remove. If NULL, user will be prompted to select from a list. This can also be a vector to remove multiple calibration functions at once.

module

the module of the calibration function to remove, currently not needed

verbose

logical flag to show messages

Value

the same PAMpalSettings object as pps, with the calibration function removed from the "calibration" slot

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


pps <- new('PAMpalSettings')
calFile <- system.file('extdata', 'calibration.csv', package='PAMpal')
pps <- addCalibration(pps, calFile, all = TRUE, units=3)
calClick <- function(data, calibration=NULL) {
    standardClickCalcs(data, calibration=calibration, filterfrom_khz = 0)
}
pps <- addFunction(pps, calClick, module = 'ClickDetector')
pps <- applyCalibration(pps, all=TRUE)
pps
removeCalibration(pps, index=1)


PAMpal documentation built on Aug. 12, 2023, 1:06 a.m.