Identify n-hour intervals beginning when a threshold is exceeded
identify_heat_stress_intervals.RdIdentify n-hour intervals beginning when a threshold is exceeded
Arguments
- dat
Data frame with at least three columns:
TIMESTAMP(must be possible to convert to POSIXct),DEPTH, andVALUE. If columnVARIABLEis included, it must have one unique entry. May also include columns with grouping variables passed to.... Other columns will be ignored.- ...
Additional columns in
datto use as grouping variables. Results are automatically grouped byDEPTH.- heat_threshold
The threshold for heat stress. Default is
heat_threshold = 18). Every observation aboveheat_thresholdtriggers ann-hourheat stress interval.- n_hours
Length of heat stress interval in hours (default is
n_hours = 24).
Value
Returns a data frame with columns: ..., DEPTH,
interval_start and interval_end. interval_start
indicates the beginning of each heat stress interval, i.e, the
TIMESTAMP of all observations where VALUE is greater than or
equal to heat_threshold. interval_end identifies the end of
the heat stress interval, i.e., interval_start + n_hours.
Note: intervals may overlap with previous interval(s).
See also
Other heat stress:
filter_out_heat_stress_events()