tau2time {tidychangepoint} | R Documentation |
Convert changepoint sets to time indices
Description
Convert changepoint sets to time indices
Usage
tau2time(tau, index)
time2tau(cpts, index)
Arguments
tau |
a numeric vector of changepoint indices |
index |
Index of times, typically returned by |
cpts |
Time series observation labels to be converted to indices |
Value
-
tau2time()
: acharacter
of time labels
-
time2tau()
: aninteger
vector of changepoint indices
See Also
Examples
# Recover the years from a set of changepoint indices
tau2time(c(42, 81, 330), index = as_year(time(CET)))
# Recover the changepoint set indices from the years
time2tau(c(1700, 1739, 1988), index = as_year(time(CET)))
[Package tidychangepoint version 1.0.1 Index]