removeFunction: Remove a Function from a PAMpalSettings Object

View source: R/removeFunction.R

removeFunctionR Documentation

Remove a Function from a PAMpalSettings Object


Remove a function from the "function" slot in a PAMpalSettings object.


removeFunction(pps, index = NULL)



a PAMpalSettings object to remove a function from


index indicating which function to move, counting from ClickDetector functions first, then WhistlesMoans functions, then Cepstrum functions. This is the same order functions appear in when examining the pps object. For example, if there are two Click functions and one Whistle function, the Whistle function would have an index of 3. If missing, user can select from a list. This can also be a vector to remove multiple functions at once.


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


Taiki Sakai


exPps <- new('PAMpalSettings')
exPps <- addFunction(exPps, roccaWhistleCalcs, module='WhistlesMoans')
exPps <- addFunction(exPps, standardCepstrumCalcs, module = 'Cepstrum')
removeFunction(exPps, 1)
removeFunction(exPps, 1:2)
# normally best to use interactively instead of specifying index
if(interactive()) removeFunction(exPps)

PAMpal documentation built on Nov. 10, 2022, 6:17 p.m.