plot.r4vn_tabts: Plot an R4VN tabts result

View source: R/tabts.R

plot.r4vn_tabtsR Documentation

Plot an R4VN tabts result

Description

Plot an R4VN tabts result

Usage

## S3 method for class 'r4vn_tabts'
plot(
  x,
  which = c("series", "forecast", "its", "counterfactual", "decomposition", "acf",
    "pacf", "residual"),
  type = NULL,
  file = NULL,
  width = NULL,
  height = NULL,
  dpi = NULL,
  ...
)

Arguments

x

An r4vn_tabts object.

which

Plot name such as "series", "forecast", "acf", "pacf", "decomposition", "residual", "its", or "counterfactual".

type

Optional alias for which.

file

Optional output path. Supported extensions are .png, .jpg, .jpeg, .tif, .tiff, .pdf, and .svg.

width, height

Figure width and height in inches when saving.

dpi

Raster resolution when saving PNG/JPEG/TIFF files.

...

Reserved for future use.

Value

Invisibly returns the plot object that is displayed or saved.

Examples


data(dengue_ts)
x <- tabts(cases, time = month, data = dengue_ts,
           model = "arima", order = c(1, 0, 1), forecast = 6,
           show = FALSE)
plot(x, "series")
plot(x, type = "forecast")
plot(x, "forecast", file = file.path(tempdir(), "forecast.png"),
     width = 8, height = 5, dpi = 300)


R4VN documentation built on Sept. 30, 2026, 5:13 p.m.