Skip to contents

Add a SA-item to a SAProcessing

Usage

add_sa_item(jsap, name, x, spec, ...)

Arguments

jsap

SAProcessing.

name

name of the SA-item to be added.

x

either a seasonal adjustment model (from rjd3x13::x13() or rjd3tramoseats::tramoseats()), a SA-item or a "ts" object.

spec

specification to use when x is a "ts" object.

...

other unused parameters.

Examples

dir <- tempdir()
y <- rjd3toolkit::ABS$X0.2.09.10.M
jws <- jws_new()
jsap1 <- jws_sap_new(jws, "sap1")
add_sa_item(jsap1, name = "x13", x = rjd3x13::x13(y))
add_sa_item(jsap1, name = "tramo", x = rjd3tramoseats::tramoseats(y))
add_sa_item(jsap1, name = "x13-2", x = y, rjd3x13::x13_spec())
add_sa_item(jsap1, name = "tramo-2", x = y, rjd3tramoseats::tramoseats_spec())
save_workspace(jws, file.path(dir, "workspace.xml"))