Quantify bouts of temperature above or below a threshold
Arguments
- df
A data frame with at least columns:
rfid
,common_dt
,variable
, andvalue
- direction
Either "above" or "below"
- threshold
Numeric threshold to compare temperature values against
- greedy
Logical. If TRUE, allow bouts to continue through NAs. Default is FALSE.
- max_gap
Numeric. Maximum number of consecutive NA values allowed within a bout. Note: bouts are still broken by non-NA values that fail the threshold condition.