cut_by_tau | R Documentation |
Use a changepoint set to break a time series into regions
cut_by_tau(x, tau)
split_by_tau(x, tau)
x |
A numeric vector |
tau |
a numeric vector of changepoint indices |
A changepoint set tau
of length k
breaks a time series of length
n
into k+1
non-empty regions.
These non-empty regions can be defined by half-open intervals, starting with
1 and ending with n+1
.
cut_by_tau()
splits a set of indices into a base::factor()
of
half-open intervals
split_by_tau()
splits a time series into a named base::list()
of numeric
vectors
cut_by_tau()
a base::factor()
of half-open intervals
split_by_tau()
a named base::list()
of numeric
vectors
base::cut()
base::split()
n <- length(CET)
# Return a factor of intervals
cut_by_tau(1:n, tau = pad_tau(c(42, 81, 330), n))
# Return a list of observations
split_by_tau(DataCPSim, c(365, 826))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.