Function to set the time series metadata of a SaItem (provider, source of the data...).
set_ts_metadata()
uses the metadata of another SaItem while put_ts_metadata()
allows to update a specific key with a new information.
Examples
# Change the file of a given item
file <- system.file("workspaces", "test.xml", package = "rjd3workspace")
jws <- .jws_load(file)
jsap <- .jws_sap(jws, 1)
jsa <- .jsap_sa(jsap, 1)
nid <- rjd3providers::spreadsheet_change_file(.jsa_ts_metadata(jsa, "@id"), "test.xlsx")
put_ts_metadata(jsap, 1, "@id", nid)
jsa <- .jsap_sa(jsap, 1)
.jsa_ts_metadata(jsa, "@id")
#> [1] "demetra://tsprovider/XCLPRVDR/20111201/SERIES?file=test.xlsx#seriesName=European+Union&sheetName=Exports"