View source: R/write_database.R
write_database | R Documentation |
Create or update a data set (metadata including series and their metadata).
write_database(x, method = "update", ...)
x |
Data set to upload. | ||||
method |
Desired method. One of | ||||
... |
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. However, an admin account must be used when creating the data set (a user with a provision agreement can update).
The functionality provided by write_database is to save the data set (structure) onto EconData's server. It is like putting out a bucket, before filling it with water. Very large datasets may need to be stripped of data and updated in chunks, as the API does not accept messages that are too long. Please Sys.sleep(0.7)
in-between each loop.
No return value, called for side-effects—writes data to server.
read_database
## Not run:
x <- read_database("MINING")
write_database(x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.