plot_recession: Plot using base plot

Description Usage Arguments Value Examples

Description

Plot using base plot

Usage

1
plot_recession(periodicity, ytop = 700, ybottom = -700, alpha = 0.3)

Arguments

periodicity

What is the periodicity of data used. Only accepts (q)uartely or (m)onthly. You can use the whole word or only the first letter

ytop, ybottom

Controls the upper and lower limits of the shading. The default should be enough for most data

alpha

Controls the transparency of the shade. Should be a number between 0 and 1

Value

If there is a time series already plot, it should shade the back. Otherwise, it returns an error.

Examples

1
2
3
4
x <- rnorm(100)
x <- ts(x,start = c(1900,01),freq=4)
plot(x)
plot_recession("q")

danmrc/recessionR documentation built on May 12, 2019, 5:16 p.m.