rdb_dimensions.Rd 3.21 KB
Newer Older
Sébastien Galais's avatar
Sébastien Galais committed
1
2
3
4
5
6
7
8
9
10
11
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rdb_dimensions.R
\name{rdb_dimensions}
\alias{rdb_dimensions}
\title{Download list of dimensions for datasets of DBnomics providers.}
\usage{
rdb_dimensions(
  provider_code = NULL,
  dataset_code = NULL,
  use_readLines = getOption("rdbnomics.use_readLines"),
  curl_config = getOption("rdbnomics.curl_config"),
12
13
  simplify = FALSE,
  ...
Sébastien Galais's avatar
Sébastien Galais committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
)
}
\arguments{
\item{provider_code}{Character string (default \code{NULL}). DBnomics code
of one or multiple providers. If \code{NULL}, the providers are firstly
dowloaded with the function \code{\link{rdb_providers}} and then the
datasets are requested.}

\item{dataset_code}{Character string (default \code{NULL}). DBnomics code
of one or multiple datasets of a provider. If \code{NULL}, the datasets
codes are dowloaded with the function \code{\link{rdb_datasets}} and then
the dimensions are requested.}

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

\item{curl_config}{Named list (default \code{NULL}). If not
\code{NULL}, it is used to configure a proxy connection. This
configuration is passed to the function \code{curl_fetch_memory} of the package
\pkg{curl}. A temporary \code{curl_handle} object is created internally
with arguments equal to the provided list in \code{curl_config}.\cr
For \code{curl_fetch_memory} arguments see \code{\link[curl]{curl_fetch}}.
For available curl options see \code{\link[curl]{curl_options}},
\code{names(curl_options())} and
\href{https://curl.haxx.se/libcurl/c/curl_easy_setopt.html}{libcurl}.}

\item{simplify}{Logical (default \code{FALSE}). If \code{TRUE}, when the
dimensions are requested for only one provider and one dataset then a
named list of \code{data.table}s is returned, not a nested named list of
\code{data.table}s.}
46
47

\item{...}{Additionals arguments.}
Sébastien Galais's avatar
Sébastien Galais committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
}
\value{
A nested named list of \code{data.table}s or a named list of
\code{data.table}s.
}
\description{
\code{rdb_dimensions} downloads the list of dimensions (if they exist) for
available datasets of a selection of providers from
\href{https://db.nomics.world/}{DBnomics}.
}
\details{
By default, the function returns a nested named list of \code{data.table}s
containing the dimensions of datasets for providers from
\href{https://db.nomics.world/}{DBnomics}.
}
\examples{
\dontrun{
65
rdb_dimensions(provider_code = "IMF", dataset_code = "WEO:2019-10")
Sébastien Galais's avatar
Sébastien Galais committed
66

67
rdb_dimensions(provider_code = "IMF", dataset_code = "WEO:2019-10", simplify = TRUE)
Sébastien Galais's avatar
Sébastien Galais committed
68
69
70
71
72
73
74
75
76

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(
77
  provider_code = "IMF", dataset_code = "WEO:2019-10",
Sébastien Galais's avatar
Sébastien Galais committed
78
79
80
81
  use_readLines = TRUE
)

rdb_dimensions(
82
  provider_code = "IMF", dataset_code = "WEO:2019-10",
Sébastien Galais's avatar
Sébastien Galais committed
83
84
85
86
87
88
  curl_config = list(proxy = "<proxy>", proxyport = <port>)
)
}
}
\seealso{
\code{\link{rdb_providers}}, \code{\link{rdb_last_updates}},
89
\code{\link{rdb_datasets}}, \code{\link{rdb_series}}
Sébastien Galais's avatar
Sébastien Galais committed
90
91
92
93
}
\author{
Sebastien Galais
}