change_points | R Documentation |
Calculates flow (Q) differences of consecutive time steps and
discriminates between time steps with increasing (IC: Q_{ts1} < Q_{ts2})
and decreasing (DC: Q_{ts1} > Q_{ts2}) flow. The differences are
transformed to 1 or -1 if the number is positive or negative, respectively.
Then the lengths of runs of equal values are computed to determine the
change point indices in the input data frame. NA
in Q values is
replaced with 0 and treated as an equal trend.
change_points(x, rownames = FALSE, omit.constant = TRUE, omit.na = TRUE)
x |
Data frame (time series) of stage measurements. Data frame must contain
a date-time column ( |
rownames |
A logical. If |
omit.constant |
A logical. If |
omit.na |
A logical. If |
A data frame which contains change point indices in the input data frame. These are the indices where an event starts and ends, and a column which indicates the event (-1 = decreasing (DC), 1 = increasing (IC)).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.