setSpecies: Set the Species Classification of an Acoustic Event

Description Usage Arguments Value Author(s)

View source: R/setSpecies.R

Description

Sets the species slot of an AcousticEvent object or list of objects

Usage

1
setSpecies(x, type = "id", method = c("pamguard", "manual", "reassign"), value)

Arguments

x

a AcousticStudy object, a list of AcousticEvent objects, or a single AcousticEvent object

type

the type of classification to set, this is just a label within the species slot

method

the method for assigning species to an event. Currently supports pamguard, which will use the 'eventType' or 'Text_Annotation' column to assign species, manual which will use value to assign species manually, or reassign which will use value to reassign an old species label to a new one

value

optional argument required if method is set to manual or reassign. For 'manual', can either be a single value to assign to all events, or if assigning to a list a vector with length equal to the list. Can also be a dataframe with columns event and species, in which case species will be matched to corresponding event names instead of just relying on the order. If using this, please note the prefix OE or DGL present on most event numbers (see the id slot of your events). For 'reassign', value must be a data frame with columns old and new. Any events with species id in the old column of the dataframe will get reassigned to the corresponding id in the new column.

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


TaikiSan21/PAMr documentation built on Nov. 15, 2020, 9:46 p.m.