Convert changepoint::cpt and strucchange::breakpoints to data.frame
## S3 method for class 'cpt'
fortify(model, data = NULL, is.date = NULL, ...)
chantepoint::cpt or strucchange::breakpoints instance
original dataset, if needed
Logical frag indicates whether the stats::ts is date or not.
If not provided, regard the input as date when the frequency is 4 or 12.
other arguments passed to methods
bp.nile <- breakpoints(Nile ~ 1)
fortify(breakpoints(bp.nile, breaks = 2))
fortify(breakpoints(bp.nile, breaks = 2), data = Nile)
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.