View source: R/identify_trending_up.R
identify_trending_up | R Documentation |
Identify when VALUE begins trending up
identify_trending_up(dat, ..., trend_threshold = 4)
dat |
Data frame with at least three columns: |
... |
Additional columns in |
trend_threshold |
The threshold for "trending up". Default is
|
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.
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
.
data("string_data")
string_data <- string_data[which(string_data$VARIABLE == "Temperature"), ]
trend_up <- identify_trending_up(string_data, trend_threshold = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.