A geom to fit a regime shifts to a time series
Usage
geom_regime(
data = NULL,
mapping = NULL,
stat = "REGIME",
geom = "vline",
position = "identity",
inherit.aes = TRUE,
na.rm = FALSE,
color = "red",
show.legend = NA
)
Arguments
- data
Input series to be analyzed. If NULL, data is inherited from previous layer or
ggplot
call.- mapping
Set of aesthetic mappings created by
aes()
. By defaultinherit.aes = TRUE
, which assigns the top-level plottingaes()
to the GLS geom.- stat
stat
- geom
geom
- position
position
- inherit.aes
inherit aesthetics
- na.rm
remove NAs
- color
color
- show.legend
show legend
- ...
Other arguments may be passed to the stat, including fixed aesthetics.