Identify n-hour intervals beginning when a threshold is exceeded
identify_heat_stress_intervals.Rd
Identify 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 columnVARIABLE
is included, it must have one unique entry. May also include columns with grouping variables passed to...
. Other columns will be ignored.- ...
Additional columns in
dat
to use as grouping variables. Results are automatically grouped byDEPTH
.- heat_threshold
The threshold for heat stress. Default is
heat_threshold = 18
). Every observation aboveheat_threshold
triggers ann-hour
heat 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()