Learn R Programming

PAMpal (version 1.4.4)

removeCalibration: 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)

Value

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

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

Author

Taiki Sakai taiki.sakai@noaa.gov

Examples

Run this code

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)

Run the code above in your browser using DataLab