| add_sa_item | R Documentation |
Add a SA-item to a SAProcessing
add_sa_item(jsap, name, x, spec)
## S3 method for class 'ts'
add_sa_item(jsap, name, x, spec)
## Default S3 method:
add_sa_item(jsap, name, x, spec)
## S3 method for class 'jobjRef'
add_sa_item(jsap, name, x, spec)
jsap |
SAProcessing. |
name |
name of the SA-item to be added. |
x |
either a seasonal adjustment model (from |
spec |
specification to use when |
NULL returned invisibly#'
dir <- tempdir()
# Raw series
y <- rjd3toolkit::ABS$X0.2.09.10.M
# Creating an empty workspace and SAProcessing
jws <- jws_new()
jsap1 <- jws_sap_new(jws, "sap1")
# Adding SA-item as estimation result
# Estimation with rjd3x13
add_sa_item(jsap1, name = "series_1", x = rjd3x13::x13(y))
# Estimation with rjd3tramoseats
add_sa_item(jsap1, name = "series_2", x = rjd3tramoseats::tramoseats(y))
# Adding SA-item as raw series + specification
add_sa_item(jsap1, name = "series_3", x = y, rjd3x13::x13_spec("RSA3"))
add_sa_item(jsap1, name = "series_4", x = y, rjd3tramoseats::tramoseats_spec("RSAFull"))
jsai1 <- jsap_sai(jsap = jsap1, idx = 1L)
# Adding SA-item from a Workspace
add_sa_item(jsap = jsap1, name = "series_1_bis", x = jsai1)
rws <- read_workspace(jws)
rws$processing$sap1$series_4
# Writing the workspace
save_workspace(jws, file.path(dir, "workspace.xml"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.