pat_filter: General purpose data filtering for PurpleAir Timeseries...

View source: R/pat_filter.R

pat_filterR Documentation

General purpose data filtering for PurpleAir Timeseries objects

Description

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

Usage

pat_filter(pat, ...)

Arguments

pat

PurpleAir Timeseries pat object.

...

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

Value

A subset of the incoming pat.

See Also

pat_filterDate

pat_filterDatetime

Examples


library(AirSensor)

unhealthy <- pat_filter(example_pat, pm25_A > 55.5, pm25_B > 55.5)
head(unhealthy$data)


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