addNote {PAMpal}R Documentation

addNote

Description

Adds a note to an AcousticEvent or AcousticStudy. Notes can either be accessed with the "getNotes" function, or up to 6 notes will be printed when the object is printed

Usage

addNote(x, to = c("study", "event"), evNum = 1, label = NULL, note)

getNotes(x)

Arguments

x

An AcousticStudy or AcousticEvent object

to

One of "study" or "event", which object to add the note to

evNum

If x is an AcousticStudy and to is "event", the number or name of the event(s) to add notes to (can be a vector of numbers or names to add the same note to multiple events)

label

(optional) a short header or label for the note. Recommended to set this as a sumamry of the more detailed note

note

the full note message

Value

For addNote, the same data as x, with notes added. For getNotes, a list of all notes present in x

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


data(exStudy)
exStudy <- addNote(exStudy, to='study', label='Note1',
                   note='My first note for this study')
exStudy <- addNote(exStudy, to='event', evNum=1:2, label='Note2',
                   note='A note for the first two events')
exStudy <- addNote(exStudy[[1]], to='event', label='Note3',
                   note='A second note for the first event')
exStudy


[Package PAMpal version 1.2.1 Index]