Identify when VALUE begins trending up
identify_trending_up.Rd
Identify when VALUE begins trending up
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
.- trend_threshold
The threshold for "trending up". Default is
trend_threshold = 4
. The last observation abovetrend_threshold
that does not return belowtrend_threshold
triggers the beginning of the growing season for eachDEPTH
and group in...
.
Value
Returns a tibble. START_TREND
is the TIMESTAMP
of the
final time VALUE
exceeds trend_threshold
and does not return
below trend_threshold
(for each DEPTH
and group in
...
).
This TIMESTAMP
is passed to identify_growing_seasons()
to
denote the start of the growing season.
START_TREND
is assigned NA
for groups for which VALUE
did not cross trend_threshold
.
Details
Identifies TIMESTAMP
when VALUE
exceeds a threshold
and does not return below the threshold, for each group in DEPTH
and
...
.
If VALUE
never crosses the threshold because temperature is always >
trend_threshold
, the date will be returned as NA
.
VALUE = trend_threshold
is considered over the threshold.