View source: R/write_dataset.R
write_econdata | R Documentation |
This function is deprecated, in favour of write_dataset
. During development, please replace this function with the newer function name.
Stages or saves the data set. Available data sets can be looked up from the web platform.
write_econdata(x, create = FALSE, update = FALSE, stage = TRUE, ...)
x |
Data set to upload. | ||||
create |
Should a new data set be created. If true, ignores | ||||
update |
Should the time series metadata be updated. | ||||
stage |
Should the time series data be staged for release (added to unreleased data). | ||||
... |
Further optional arguments:
|
An EconData account is required to use this function. The user must provide an API token, which can be found on the Account page of the online portal. A GUI dialog will prompt the user for their API token. Credentials can also be supplied by setting the ECONDATA_CREDENTIALS environment variable using the syntax: "client_id;client_secret", e.g. Sys.setenv(ECONDATA_CREDENTIALS="client_id;client_secret")
, when available.
The functionality provided by write_econdata is to save the data set according to the function arguments. As this makes modifications to the database the user calling this function requires higher privileges than needed for other econdatar functions—the user requires membership with the relevant data provider.
No return value, called for side-effects—writes data to server.
write_dataset
read_econdata
write_release
## Not run:
x <- read_econdata("MINING")
tmp <- tempdir()
write_econdata(x, file = file.path(tmp, "mining.json"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.