addMeasures {PAMpal} | R Documentation |
Add Measures
Description
Adds "measures" to an AcousticStudy or AcousticEvent. A "measure" is an event-level variable that will be exported alongside data from that event
Usage
addMeasures(x, measures, replace = TRUE)
getMeasures(x)
Arguments
x |
an AcousticStudy or AcousticEvent object |
measures |
the measures to add. Can either be a named list,
where names match event names of |
replace |
logical flag whether or not to replace |
Value
object of same class as x
with measures added
Author(s)
Taiki Sakai taiki.sakai@noaa.gov
Examples
data(exStudy)
measList <- list('Example.OE1' = list(a=1, b=2),
'Example.OE2' = list(a=2, b=3)
)
exMeasure <- addMeasures(exStudy, measList)
print(getMeasures(exMeasure))
measDf <- data.frame(eventId = c('Example.OE1', 'Example.OE2'),
a=4:5,
b=6:7)
exMeasure <- addMeasures(exMeasure, measDf, replace=TRUE)
getMeasures(exMeasure)
[Package PAMpal version 1.2.1 Index]