addAnnotation: Add Annotation Data to an AcousticStudy Object

View source: R/addAnnotation.R

addAnnotationR Documentation

Add Annotation Data to an AcousticStudy Object

Description

Adds annotation data to an AcousticStudy object, usually in preparation for exporting to an external source. Most pieces of the annotation form will be filled in by the user when the function is called, but lat, lon, time_start, time_end, freq_low, freq_high, source_id, and annotation_id will be filled in automatically based on data in each AcousticEvent. Annotations are stored for each event in the ancillary slot.

Usage

addAnnotation(x, anno, verbose = TRUE)

prepAnnotation(
  x,
  specMap = NULL,
  mode = c("event", "detection"),
  interactive = FALSE,
  ...
)

getAnnotation(x)

checkAnnotation(x)

export_annomate(x, file = NULL)

matchRecordingUrl(anno, rec)

Arguments

x

an AcousticStudy or AcousticEvent object

anno

an annotation dataframe

verbose

logical flag to print messages

specMap

data.frame to map species ids in x to names to be used for the annotation (ex. from 'ZC' to 'Ziphius cavirostris'. Dataframe must have columns old and new

mode

one of 'event' or 'detection' to create annotation for events or detections

interactive

logical flag to fill annotation data interactively (not recommended)

...

additional named arguments to fill in annotation data. If names match a column in the annotation, that value will be used for all events or detections in the annotation

file

file to write a CSV of the annotations to, if NULL (default) then no file will be written

rec

dataframe of recording url information. Must have column recording_url. If clips were created using writeEventClips, then must have column filename containing the wav file names. Other column names will be automatically parsed from there. If wav files are from another source, must contain columns matchId

Value

The same object as x with an $annotation item added the the ancillary slot of each event in x

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


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