View source: R/import_workspace.R
get_ts | R Documentation |
Generic functions to retrieve the input raw time series of a workspace
, multiprocessing
,
sa_item
or SA
object.
get_ts(x)
x |
the object from which to retrieve the time series. |
get_ts()
returns a ts
object or list of ts
objects:
if x
is a sa_item
or a SA
object, get_ts(x)
returns a single ts
object;
if x
is a multiprocessing
object, get_ts(x)
returns a list of length the number
of sa_items, each element being a ts
object;
if x
is a workspace
object, get_ts(x)
returns a list of length the number of multiprocessings,
each element being a list of ts
objects.
Other functions to retrieve information from a workspace, multiprocessing or sa_item: count
, get_model
, get_name
.
sa_x13 <- x13(ipi_c_eu[, "FR"], spec = "RSA5c")
wk <- new_workspace()
mp <- new_multiprocessing(wk, "sap1")
add_sa_item(wk, "sap1", sa_x13, "X13")
sa_item <- get_object(mp, 1)
# Extracting the raw time series from an adjusted series:
get_ts(sa_x13) # Returns the ts object ipi_c_eu[, "FR"]
# Extracting the raw time series from a sa_item:
get_ts(sa_item) # Returns the ts object ipi_c_eu[, "FR"]
# Extracting all raw time series from a multiprocessing:
# Returns a list of length 1 named "X13" containing the ts object ipi_c_eu[, "FR"]:
get_ts(mp)
# Extracting all raw time series from a workspace:
# Returns a list of length 1 named "sap1" containing a list
# of length 1 named "X13", containing the ts object ipi_c_eu[, "FR"]
get_ts(wk)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.