Convert changepoint::cpt and strucchange::breakpoints to data.frame
Source: R/fortify_changepoint.R
fortify.cpt.RdConvert changepoint::cpt and strucchange::breakpoints to data.frame
Arguments
- model
chantepoint::cptorstrucchange::breakpointsinstance- data
original dataset, if needed
- is.date
Logical frag indicates whether the
stats::tsis date or not. If not provided, regard the input as date when the frequency is 4 or 12.- ...
other arguments passed to methods
Examples
if (FALSE) { # \dontrun{
library(changepoint)
fortify(cpt.mean(AirPassengers))
fortify(cpt.var(AirPassengers))
fortify(cpt.meanvar(AirPassengers))
library(strucchange)
bp.nile <- breakpoints(Nile ~ 1)
fortify(bp.nile)
fortify(breakpoints(bp.nile, breaks = 2))
fortify(breakpoints(bp.nile, breaks = 2), data = Nile)
} # }