rdb_datasets: Download list of datasets for DBnomics providers.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rdb_datasets.R

Description

rdb_datasets downloads the list of available datasets for a selection of providers (or all of them) from DBnomics.

Usage

1
2
3
4
5
6
7
rdb_datasets(
  provider_code = NULL,
  use_readLines = getOption("rdbnomics.use_readLines"),
  curl_config = getOption("rdbnomics.curl_config"),
  simplify = FALSE,
  ...
)

Arguments

provider_code

Character string (default NULL). DBnomics code of one or multiple providers. If NULL, the providers are firstly dowloaded with the function rdb_providers and then the available datasets are requested.

use_readLines

Logical (default FALSE). If TRUE, then the data are requested and read with the base function readLines i.e. through the default R internet connection. This can be used to get round the error Could not resolve host: api.db.nomics.world.

curl_config

Named list (default NULL). If not NULL, it is used to configure a proxy connection. This configuration is passed to the function curl_fetch_memory of the package curl. A temporary curl_handle object is created internally with arguments equal to the provided list in curl_config.
For curl_fetch_memory arguments see curl_fetch. For available curl options see curl_options, names(curl_options()) and libcurl.

simplify

Logical (default FALSE). If TRUE, when the datasets are requested for only one provider then a data.table is returned, not a list of data.tables.

...

Additionals arguments.

Details

By default, the function returns a named list of data.tables containing the datasets of the providers from DBnomics.

Value

A named list of data.tables or a data.table.

Author(s)

Sebastien Galais

See Also

rdb_providers, rdb_last_updates, rdb_dimensions, rdb_series

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
rdb_datasets(provider_code = "IMF")

rdb_datasets(provider_code = "IMF", simplify = TRUE)

rdb_datasets(provider_code = c("IMF", "BDF"))

options(rdbnomics.progress_bar_datasets = TRUE)
rdb_datasets()
options(rdbnomics.progress_bar_datasets = FALSE)


rdb_datasets(provider_code = "IMF", use_readLines = TRUE)

rdb_datasets(
  provider_code = "IMF",
  curl_config = list(proxy = "<proxy>", proxyport = <port>)
)

## End(Not run)

rdbnomics documentation built on Oct. 26, 2020, 1:06 a.m.