autoplot.cpt: Autoplot 'changepoint::cpt'

Description Usage Arguments Value Examples

View source: R/fortify_changepoint.R

Description

Autoplot changepoint::cpt

Usage

1
2
3
## S3 method for class 'cpt'
autoplot(object, is.date = NULL, cpt.colour = "#FF0000",
  cpt.linetype = "dashed", ...)

Arguments

object

changepoint::cpt instance

is.date

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.

cpt.colour

Line colour for changepoints

cpt.linetype

Line type for changepoints

...

other arguments passed autoplot.ts

Value

ggplot

Examples

1
2
3
library(changepoint)
autoplot(cpt.mean(AirPassengers))
autoplot(cpt.meanvar(AirPassengers))

Example output

Loading required package: ggplot2
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Successfully loaded changepoint package version 2.2.2
 NOTE: Predefined penalty values changed in version 2.2.  Previous penalty values with a postfix 1 i.e. SIC1 are now without i.e. SIC and previous penalties without a postfix i.e. SIC are now with a postfix 0 i.e. SIC0. See NEWS and help files for further details.

ggfortify documentation built on April 19, 2018, 1:03 a.m.