R/plotSiRatios.R
plotSiRatios.Rd
Produces a ggplot
/plotly
object for objects of class persephone.
If the persephone
object is of class tramoseatsSingle
, the function
generates an interactive plot of the SI-ratios and their mean. Otherwise,
i.e. if the object is of class x13Single
, the SI-ratios, the replaced
SI-ratios, the seasonal factors and the mean of the seasonal factors are
plotted.
plotSiRatios(x, main = NULL, interactive = TRUE, ...)
an object of class persephone.
plot title
If the return value would be a ggplot
object, wrap it in
plotly::ggplotly before returning.
other plotting parameters to affect the plot. Not currently used.
Returns an object of class ggplot
or plotly
data(AirPassengers, package = "datasets")
# Generate a persephone object, in this case an x13Single object
obj <- perX13(AirPassengers, "RSA1")
obj$run()
# Plot the SI-ratios after run
plotSiRatios(obj)
data(UKgas, package = "datasets")
# Generate a persephone object, in this case a tramoseatsSingle object
obj2 <- perTramo(UKgas, "RSA3")
obj2$run()
plotSiRatios(obj2)