Skip to contents

Add SAItem to SAProcessing

Usage

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

Arguments

jsap

the SAProcessing.

name

the name of SAItem.

x

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

spec

the 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, "sa1")
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"))