sensor_filter: Data filtering for AirSensor objects

Description Usage Arguments Value Note See Also Examples

View source: R/sensor_filter.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
sensor_filter(sensor = NULL, ...)

Arguments

sensor

An AirSensor object.

...

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

Value

A subset of the incoming sensor.

Note

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

See Also

sensor_filterDate

sensor_filterMeta

Examples

1
2
3
4
5
6
library(AirSensor)

twenties <- sensor_filter(example_sensor, 
                          example_sensor$data$`392a12065eb9940d_5192` <  30, 
                          example_sensor$data$`392a12065eb9940d_5192` >= 20)
head(twenties$data)

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