A generalized data filter for rawsDF 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.

rawsDF_filter(rawsDF = NULL, ...)

Arguments

rawsDF

rawsDF object.

...

Logical predicates defined in terms of the variables in the rawsDF.

Value

A subset of the incoming rawsDF.

Examples

# \donttest{
library(RAWSmet)

rawsObject <- example_cefa_Saddle_Mountain
rawsDF <- rawsObject %>% raws_toRawsDF()

daytime <- rawsDF_filter(rawsDF, solarRadiation > 0)
head(daytime)
#> # A tibble: 6 × 21
#>   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
#> # ℹ 15 more variables: maxGustDirection <dbl>, precipitation <dbl>,
#> #   solarRadiation <dbl>, fuelMoisture <dbl>, fuelTemperature <chr>,
#> #   monitorType <chr>, nwsID <chr>, wrccID <chr>, locationName <chr>,
#> #   longitude <dbl>, latitude <dbl>, timezone <chr>, elevation <dbl>,
#> #   VPD <dbl>, FFWI <dbl>
# }