Learn R Programming

PAMpal (version 1.4.4)

addFunction: 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, default = FALSE, ...)

Value

the same PAMpalSettings object as pps, with the function

fun added to the "functions" slot

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

default

logical flag to use default function parameters if present

...

named arguments to pass to function being added

Author

Taiki Sakai taiki.sakai@noaa.gov

Examples

Run this code

# 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')

Run the code above in your browser using DataLab