Function to set the specification of a "sa_item"
.
set_spec(sa_item, spec)
a new "sa_item"
with the new specification
library("RJDemetra")
sa_x13 <- jx13(series = ipi_c_eu[, "FR"])
sa_ts <- jtramoseats(series = ipi_c_eu[, "FR"])
wk <- new_workspace()
sap1 <- new_multiprocessing(workspace = wk, name = "sap-1")
add_sa_item(
workspace = wk,
multiprocessing = "sap-1",
sa_obj = sa_x13,
name = "tramo seats"
)
sa_item1 <- get_object(x = sap1, pos = 1L)
new_sa_item <- set_spec(sa_item = sa_item1, spec = sa_ts)
# The first sa_item is now seasonally adjusted with TRAMO-SEATS
replace_sa_item(sap = sap1, pos = 1, sa_item = new_sa_item)