filter.AcousticStudy | R Documentation |
Apply dplyr-like filtering to the detecitons of an AcousticStudy or AcousticEvent object, with a special case for filtering by species for an AcousticStudy
## S3 method for class 'AcousticStudy'
filter(.data, ..., .preserve = FALSE)
.data |
AcousticStudy or AcousticEvent to filter |
... |
Logical expressions, syntax is identical to filter. There are special cases to filter by environmental variables, species ID, database, or detector name. See details. |
.preserve |
not used |
Most expression provided will be used to filter out detections based on calculated parameters.
If the name of an environmental variable added using matchEnvData,AcousticStudy-method is provided, will filter to only events with environmental variables matching those conditions.
If a provided logical expression uses
"species"
or "Species"
, then events will be filtered using the
species present in the $id
of the species
slot of each event.
If a provided logical expression uses "database"
or "Database"
,
then only events with databases matching the expression in files(.data)$db
will remain
If a provided logical expression uses "detector"
or "Detector"
, then
only detections from detectors with names matching the expression will remain in
events. Any events left with no detections will be removed.
The original .data
object, filtered by the given logical expressions
Taiki Sakai taiki.sakai@noaa.gov
# create example data
data(exStudy)
exStudy <- setSpecies(exStudy, method='manual', value=letters[1:2])
filterData <- filter(exStudy, peak < 20)
getDetectorData(filterData)$click
filterData <- filter(exStudy, species == 'a')
species(filterData[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.