sensor_filterMeta: Metadata filtering for AirSensor objects

View source: R/sensor_filterMeta.R

sensor_filterMetaR Documentation

Metadata filtering for AirSensor objects

Description

A generalized data filter for sensor objects to choose rows/cases where conditions are true. Multiple conditions are combined with & or seperated by a comma. Only rows where the condition evaluates to TRUE are kept.Rows where the condition evaluates to NA are dropped.

Usage

sensor_filterMeta(sensor = NULL, ...)

Arguments

sensor

An AirSensor object.

...

Logical predicates defined in terms of the variables in sensor$meta.

Value

A subset of the incoming sensor.

Note

Filtering predicates are applied to the meta dataframe within the sensor object.

See Also

sensor_filter

sensor_filterDate

Examples

library(AirSensor)

example_sensor_scaqmd %>%
  sensor_extractMeta() %>%
  dplyr::pull("communityRegion") %>%
  sort () %>%
  unique()
  
example_sensor_scaqmd %>%
  sensor_filterMeta(communityRegion == "Imperial Valley") %>%
  sensor_extractMeta() %>%
  dplyr::pull("communityRegion") %>%
  sort () %>%
  unique()


MazamaScience/AirSensor documentation built on April 28, 2023, 11:16 a.m.