rdb_dimensions: Download list of dimensions for datasets of DBnomics...

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

View source: R/rdb_dimensions.R

Description

rdb_dimensions downloads the list of dimensions (if they exist) for available datasets of a selection of providers from DBnomics.

Usage

1
2
3
4
5
6
7
8
rdb_dimensions(
  provider_code = NULL,
  dataset_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 datasets are requested.

dataset_code

Character string (default NULL). DBnomics code of one or multiple datasets of a provider. If NULL, the datasets codes are dowloaded with the function rdb_datasets and then the dimensions 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 dimensions are requested for only one provider and one dataset then a named list of data.tables is returned, not a nested named list of data.tables.

...

Additionals arguments.

Details

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

Value

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

Author(s)

Sebastien Galais

See Also

rdb_providers, rdb_last_updates, rdb_datasets, rdb_series

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
rdb_dimensions(provider_code = "IMF", dataset_code = "WEO:2019-10")

rdb_dimensions(provider_code = "IMF", dataset_code = "WEO:2019-10", simplify = TRUE)

rdb_dimensions(provider_code = "IMF")

# /!\ It is very long !
options(rdbnomics.progress_bar_dimensions = TRUE)
rdb_dimensions()
options(rdbnomics.progress_bar_dimensions = FALSE)

rdb_dimensions(
  provider_code = "IMF", dataset_code = "WEO:2019-10",
  use_readLines = TRUE
)

rdb_dimensions(
  provider_code = "IMF", dataset_code = "WEO:2019-10",
  curl_config = list(proxy = "<proxy>", proxyport = <port>)
)

## End(Not run)

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