Last chance! 50% off unlimited learning
Sale ends in
Generics functions to get seasonally adjusted model(s) from workspace
,
multiprocessing
or sa_item
object. get_model
returns a "SA"
objects while get_jmodel
returns the Java objects of the models.
get_jmodel(x, workspace, userdefined = NULL, progress_bar = TRUE)get_model(x, workspace, userdefined = NULL, progress_bar = TRUE)
the object to get the seasonnaly adjusted model.
the workspace object where models are stored. If x
is a workspace
object this parameter is not used.
vector with characters for additional output variables.
(see x13
or tramoseats
).
boolean: if TRUE
a progress bar is printed.
get_model()
returns a seasonnaly adjust object (class c("SA", "X13")
or c("SA", "TRAMO_SEATS"
) or list of seasonnaly adjust objects:
if x
is a sa_item
object, get_model(x)
returns a "SA"
object (or a jSA
object with get_jmodel(x)
);
if x
is a multiprocessing
object, get_ts(x)
returns list of length the number
of sa_items, each element containing a "SA"
object (or a jSA
object with get_jmodel(x)
);
if x
is a workspace
object, get_ts(x)
returns list of length the number of multiprocessing,
each element containing a list of a "SA"
object (or a jSA
object with get_jmodel(x)
).
Other functions to get informations from a workspace, multiprocessing or sa_item: count
,
get_name
, get_object
,
get_ts
# NOT RUN {
spec_x13 <- x13_spec(spec = "RSA5c", easter.enabled = FALSE)
sa_x13 <- x13(ipi_c_eu[, "FR"], spec = spec_x13)
spec_ts <- tramoseats_spec(spec = "RSA5")
sa_ts <- tramoseats(ipi_c_eu[, "FR"], spec = spec_ts)
wk <- new_workspace()
mp <- new_multiprocessing(wk, "sa1")
add_sa_item(wk, "sa1", sa_x13, "X13")
add_sa_item(wk, "sa1", sa_ts, "TramoSeats")
compute(wk) # It's important to compute the workspace to get the SA model
sa_item1 <- get_object(mp, 1)
get_model(sa_item1, wk) # Extract the model of the sa_item1: its the object sa_x13
# To get all the models of the multiprocessing mp:
get_model(mp, wk)
# To get all the models of the workspace wk:
get_model(wk)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab