These functions create summary functions for use inside the statistics
argument of summarise_weather_window(), scan_windows(), and
window_pane(). Each function returns a closure that is applied to a numeric
vector from one weather variable.
Usage
count_above(threshold, na.rm = TRUE)
count_at_or_above(threshold, na.rm = TRUE)
count_below(threshold, na.rm = TRUE)
count_at_or_below(threshold, na.rm = TRUE)
count_between(lower, upper, inclusive = TRUE, na.rm = TRUE)
proportion_above(threshold, na.rm = TRUE)
proportion_at_or_above(threshold, na.rm = TRUE)
proportion_below(threshold, na.rm = TRUE)
proportion_at_or_below(threshold, na.rm = TRUE)
proportion_between(lower, upper, inclusive = TRUE, na.rm = TRUE)Arguments
- threshold
A single finite numeric threshold.
- na.rm
If
TRUE, missing values are ignored. For proportion functions, the denominator is the number of non-missing observations.- lower, upper
Single finite numeric limits.
lowermust be less than or equal toupper.- inclusive
If
TRUE, values equal to the boundary are included.
