Identify start and end of non-overlapping heat stress events
identify_heat_stress_events.Rd
Identify start and end of non-overlapping heat stress events
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 tibble with columns: ...
, DEPTH
,
event_id
, stress_start
and stress_end
.
Note: Events for a given depth do not overlap, but event_end
and
event_start
may be consecutive timestamps.
Details
Every observation that exceeds the threshold is assigned a heat
stress interval (TIMESTAMP
of the observation + n_hours). Intervals
may overlap with one or more other intervals.
Heat stress events are denoted by the beginning and end of overlapping
intervals for each DEPTH
and group in ...
. Heat stress events
do not overlap, but they may end and start on consecutive
TIMESTAMP
s.