diff --git a/R/rdb_series.R b/R/rdb_series.R index 2103cf9faf200185854c90a69ccfcdd7a1de94b2..31c4ede9d5bb58508d7676f4a82c8a2e1ed59730 100644 --- a/R/rdb_series.R +++ b/R/rdb_series.R @@ -8,7 +8,7 @@ #' a total of approximately 720 millions series. #' #' By default, the function returns a nested named list of \code{data.table}s -#' containing the dimensions of datasets for providers from +#' containing the series of datasets for providers from #' \href{https://db.nomics.world/}{DBnomics}. #' #' @param provider_code Character string (default \code{NULL}). DBnomics code @@ -18,7 +18,7 @@ #' @param 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. +#' the series are requested. #' @param 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 @@ -33,14 +33,13 @@ #' \code{names(curl_options())} and #' \href{https://curl.haxx.se/libcurl/c/curl_easy_setopt.html}{libcurl}. #' @param 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 +#' series are requested for only one provider and one dataset then a +#' \code{data.table} is returned, not a nested named list of #' \code{data.table}s. #' @param verbose Logical (default \code{FALSE}). Show number of series per #' datasets and providers. #' @param ... Additionals arguments. -#' @return A nested named list of \code{data.table}s or a named list of -#' \code{data.table}s. +#' @return A nested named list of \code{data.table}s or a \code{data.table}. #' @examples #' \dontrun{ #' rdb_series(provider_code = "IMF", dataset_code = "WEO") diff --git a/README.md b/README.md index 7006bf525d8e5a1215ab29d1d55b1b5c7a919d6b..7f56221832a580f53a06b88a058aaf8e178aa7e8 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,9 @@ df_dimensions <- rdb_dimensions(provider_code = "IMF", dataset_code = "WEO", sim ## Fetch the number of series of available datasets of a provider ```r # Example for the dataset WEOAGG of the IMF: -rdb_series(provider_code = "IMF", dataset_code = "WEOAGG", simplify = TRUE) +df_series <- rdb_series(provider_code = "IMF", dataset_code = "WEOAGG") + +df_series <- rdb_series(provider_code = "IMF", dataset_code = "WEOAGG", simplify = TRUE) ``` :warning: We ask the user to use this function parsimoniously because there are a huge amount diff --git a/man/rdb_series.Rd b/man/rdb_series.Rd index 3a4d8fab3f50146fe0e5b66ce2744e8aec45f30e..28bd6662597efe4228f0b9fe29aa22c11ea60df1 100644 --- a/man/rdb_series.Rd +++ b/man/rdb_series.Rd @@ -23,7 +23,7 @@ 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.} +the series 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. @@ -41,8 +41,8 @@ For available curl options see \code{\link[curl]{curl_options}}, \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 +series are requested for only one provider and one dataset then a +\code{data.table} is returned, not a nested named list of \code{data.table}s.} \item{verbose}{Logical (default \code{FALSE}). Show number of series per @@ -51,8 +51,7 @@ datasets and providers.} \item{...}{Additionals arguments.} } \value{ -A nested named list of \code{data.table}s or a named list of -\code{data.table}s. +A nested named list of \code{data.table}s or a \code{data.table}. } \description{ \code{rdb_series} downloads the list of series for @@ -64,7 +63,7 @@ a total of approximately 720 millions series. } \details{ By default, the function returns a nested named list of \code{data.table}s -containing the dimensions of datasets for providers from +containing the series of datasets for providers from \href{https://db.nomics.world/}{DBnomics}. } \examples{ diff --git a/vignettes/rdbnomics.Rmd b/vignettes/rdbnomics.Rmd index 2d8813cd08e9d5cb7175e6a5af2d747ed721333c..6fc25b2e55e5e9ffb2a5016d91fc5086360bf924 100644 --- a/vignettes/rdbnomics.Rmd +++ b/vignettes/rdbnomics.Rmd @@ -731,7 +731,7 @@ rdbnomics:::rdbnomics_df022 %>% You can download the list of series, and especially their codes, of a dataset's provider by using the function `rdb_series`. The result is a nested named list with a `data.table` at the end of each branch. If you define `simplify = TRUE`, -then the result will be a named list `data.table` not a nested named list. +then the result will be a `data.table` not a nested named list. For example, for the **IMF** provider and the dataset **WEO**, the command is: ```{r, eval = FALSE} rdb_series(provider_code = "IMF", dataset_code = "WEO", simplify = TRUE)