sensor_filterMeta: Metadata filtering for AirSensor objects

Description Usage Arguments Value Note See Also Examples

View source: R/sensor_filterMeta.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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()

AirSensor documentation built on March 13, 2021, 1:07 a.m.