Skip to contents

Filter out observations that occur during heat stress events

Usage

filter_out_heat_stress_events(dat, heat_threshold = 18, n_hours = 24)

Arguments

dat

Data frame with at least three columns: TIMESTAMP (must be possible to convert to POSIXct), DEPTH, and VALUE. If column VARIABLE is included, it must have one unique entry. May also include columns with grouping variables passed to .... Other columns will be ignored.

heat_threshold

The threshold for heat stress. Default is heat_threshold = 18). Every observation above heat_threshold triggers an n-hour heat stress interval.

n_hours

Length of heat stress interval in hours (default is n_hours = 24).

Value

Returns dat, filtered to remove observations that occur during heat stress events.

Details

Filters out observations that occur during heat stress events, as defined by identify_heat_stress_events().

Every observation that exceeds the threshold has a corresponding 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. Heat stress events do not overlap, but they may end and start on consecutive timestamps.

See also

Other heat stress: identify_heat_stress_intervals()