layer_changepoints: Get layers to overlay significant changepoints on prophet...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Get layers to overlay significant changepoints on prophet forecast plot.

Usage

1
2
layer_changepoints(m, threshold = 0.01, cp_color = "red",
  cp_linetype = "dashed", trend = TRUE, ...)

Arguments

m

Prophet model object.

threshold

Numeric, changepoints where abs(delta) >= threshold are significant. (Default 0.01)

cp_color

Character, color for ggplot. (Default "red")

cp_linetype

Character or integer, linetype for ggplot. (Default "dashed")

trend

Logical, if FALSE, do not draw trend line. (Default TRUE)

...

Other arguments passed on to layers.

Value

A list of ggplot2 layer.

Examples

1
2
3
4
## Not run: 
plot(m, fcst) + layer_changepoints(m)

## End(Not run)

hoxo-m/prophetExt documentation built on Jan. 18, 2021, 11:12 a.m.