addFunction: Add a Function to a PAMpalSettings Object

View source: R/addFunction.R

addFunctionR Documentation

Add a Function to a PAMpalSettings Object

Description

Adds a new function to the "function" slot in a PAMpalSettings object. Must be run interactively, user will be prompted to assign values for any parameters in the function to be added

Usage

addFunction(pps, fun, module = NULL, verbose = TRUE, ...)

Arguments

pps

a PAMpalSettings object to add a function to

fun

function to add OR another PAMpalSettings object. In this case all functions from the second object will be added to pps

module

Pamguard module output this function should act on, one of ClickDetector, WhistlesMoans, Cepstrum, or GPLDetector. If NULL (default), user will be prompted to select which module it applies to

verbose

logical flag to show messages

...

named arguments to pass to function being added

Value

the same PAMpalSettings object as pps, with the function fun added to the "functions" slot

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


# not recommended to create a pps like this, for example only
pps <- new('PAMpalSettings')
if(interactive()) pps <- addFunction(pps, standardClickCalcs)
pps <- addFunction(pps, roccaWhistleCalcs, module='WhistlesMoans')


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