Skip to contents

This function updates a JDemetra+ workspace (.xml) by assigning user-defined trading day regressors (TD) to each series (SA-Item), based on an external correspondence table, which can be created with retrieve_td().

This function modifies the domainSpec of each series by setting tradingdays to "UserDefined" with the appropriate regressors (REG1REG6, optionally with LY for leap year).

Usage

assign_td(td, jws)

Arguments

td

[data.frame] A data.frame with at least two columns:

  • series: name of the series in the workspace.

  • regs: standard INSEE TD set (REG1, REG2, …, REG6, with or without _LY) (created by retrieve_td or import_td).

jws

A Java Workspace object, as returned by rjd3workspace::jws_open() or rjd3workspace::jws_new().

Value

The object jws updated with new td regressors.

Details

This function only modifies the first SA-Processing.

Examples

if (FALSE) { # \dontrun{
# Load a workspace and apply INSEE TD sets
td_table <- retrieve_td("workspace.xml")
assign_td(td = td_table, ws_path = "workspace.xml")
} # }