/
get_data_dict.Rd
62 lines (53 loc) · 2.13 KB
/
get_data_dict.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_data_dict.R
\name{get_data_dict}
\alias{get_data_dict}
\title{Get the WHO Data Dictionary for TB Data}
\usage{
get_data_dict(
url = NULL,
download_data = TRUE,
save = TRUE,
dict_save_name = NULL,
return = TRUE,
verbose = FALSE,
use_utils = FALSE,
retry_download = TRUE
)
}
\arguments{
\item{url}{Character string, indicating the url of the data
dictionary. This argument is depreciated and will be removed from future releases.}
\item{download_data}{Logical, defaults to \code{TRUE}. If not found locally should the data be
downloaded from the specified URL?}
\item{save}{Logical, should the data be saved for reuse during the current R session. Defaults to
\code{TRUE}. If \code{TRUE} then the data is saved to the temporary directory specified by \code{\link[base]{tempdir}}.}
\item{dict_save_name}{Character string, name to save dictionary under. This argument is depreciated
and will be removed from future releases. Dataset naming is now handled internally.}
\item{return}{Logical, should the data dictionary be returned as a dataframe.
Defaults to \code{TRUE}.}
\item{verbose}{Logical, defaults to \code{FALSE}. Should additional status and progress messages
be displayed.}
\item{use_utils}{Logical, defaults to \code{FALSE}. Used for testing alternative
data download function. When \code{TRUE} data is downloaded using \code{read.csv}.}
\item{retry_download}{Logical defaults to \code{TRUE}. When \code{TRUE}, if downloading
fails, the function will try repeatedly to download the data within 3 seconds, up
to 3 times.}
}
\value{
The WHO TB data dictionary as a tibble with 4 variables:
variable_name, dataset, code_list, definition.
}
\description{
Get the data dictionary for TB burden data from the WHO, see
\href{http://www.who.int/tb/country/data/download/en/}{here} for details. This function will first attempt
to load the data from the temporary directory (\code{\link[base]{tempdir}}). If that fails, and \code{download_data = TRUE}, it
will instead download the data.
}
\examples{
dict <- get_data_dict()
head(dict)
}
\seealso{
get_data search_data_dict
}