pas_filter | R Documentation |
A generalized data filter for pas objects to choose rows/cases where conditions are true. Rows where the condition evaluates to NA are dropped.
This function is essentially dplyr::filter
with an extra check on the validity of the pas object.
pas_filter(pas, ...)
pas |
PurpleAir Synoptic pas object. |
... |
Logical predicates defined in terms of the variables in the
|
A subset of the incoming pas object.
pas_filterArea
pas_filterNear
pas_filterNearMonitor
library(AirSensor2)
nrow(example_pas_pm25)
# Washington
WA_pas <-
example_pas_pm25 %>%
pas_filter(stateCode == "WA")
nrow(WA_pas)
# Okanogan and Ferry Counties
Colville_Tribes_pas <-
example_pas_pm25 %>%
pas_filter(stateCode == "WA") %>%
pas_filter(countyName %in% c("Okanogan", "Ferry"))
nrow(Colville_Tribes_pas)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.