View source: R/tsp.series_factor.R
tsp.series_factor | R Documentation |
Time series with factor variable plot
tsp.series_factor(x, factor, color = TRUE, gg = TRUE)
x |
Univaritate Time series, "ts" class object |
factor |
"factor" class object |
color |
logical, True (default) print plot with colors |
ggplot |
logial, True (default) use ggplot2 device |
series <- ts(rnorm(120,120,120),start = c(2012,1),frequency = 12) factor <- factor(x = rbinom(120,1,0.9),levels = 0:1,labels = c("No crisis","Crisis")) tsp.series_factor(series,factor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.