setSpecies {PAMpal} | R Documentation |
Set the Species Classification of Events
Description
Sets the species
slot of AcousticEvent
objects within an AcousticStudy
Usage
setSpecies(x, method = c("pamguard", "manual", "reassign"), value, type = "id")
Arguments
x |
a AcousticStudy object, a list of AcousticEvent objects, or a single AcousticEvent object |
method |
the method for assigning species to an event. Currently supports
|
value |
required only if |
type |
the type of classification to set, this is just a label within
the |
Value
the same object as x
, with species identifications assigned
as an item named type
in the species
slot
Author(s)
Taiki Sakai taiki.sakai@noaa.gov
Examples
# setting up example data
exPps <- new('PAMpalSettings')
exPps <- addDatabase(exPps, system.file('extdata', 'Example.sqlite3', package='PAMpal'))
exPps <- addBinaries(exPps, system.file('extdata', 'Binaries', package='PAMpal'))
exClick <- function(data) {
standardClickCalcs(data, calibration=NULL, filterfrom_khz = 0)
}
exPps <- addFunction(exPps, exClick, module = 'ClickDetector')
exPps <- addFunction(exPps, roccaWhistleCalcs, module='WhistlesMoans')
exPps <- addFunction(exPps, standardCepstrumCalcs, module = 'Cepstrum')
exData <- processPgDetections(exPps, mode='db')
exData <- setSpecies(exData, method='pamguard')
species(exData)
exData <- setSpecies(exData, method='manual', value = c('sp1', 'sp2'))
species(exData)
exData <- setSpecies(exData, method='reassign',
value = data.frame(old='sp1', new='sp3'))
species(exData)