A generalized data filter for raws_timeseries 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.
raws_filter(rawsObject = NULL, ...)
raws_timeseries object.
Logical predicates defined in terms of the variables in the
rawsObject$data
.
A subset of the incoming raws_timeseries
.
# \donttest{
library(RAWSmet)
rawsObject <- example_cefa_Saddle_Mountain
daytime <- raws_filter(rawsObject, solarRadiation > 0)
head(daytime$data)
#> # A tibble: 6 × 12
#> datetime temperature humidity windSpeed windDirection maxGustSpeed
#> <dttm> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2017-01-01 17:00:00 -5 97 0.894 127 1.79
#> 2 2017-01-01 18:00:00 -4.44 99 0.894 293 1.34
#> 3 2017-01-01 19:00:00 -2.78 99 1.79 273 2.24
#> 4 2017-01-01 20:00:00 -2.22 99 0.894 252 2.24
#> 5 2017-01-01 21:00:00 -2.22 99 0.894 212 1.34
#> 6 2017-01-01 22:00:00 -1.67 99 0.894 325 1.34
#> # ℹ 6 more variables: maxGustDirection <dbl>, precipitation <dbl>,
#> # solarRadiation <dbl>, fuelMoisture <dbl>, fuelTemperature <chr>,
#> # monitorType <chr>
# }