Description Usage Arguments Value Examples
View source: R/1.data_engineering.R
'get.CME.UI.data' can read in "Rates & Deaths_Country Summary.csv" for any
indicators published so far and include Sex, Quantile in the output. A
pre-saved list of summary.csv files directories could be obtained by
load.final_dir
. Output dataset in either long, wide year, wide
indicator, or wide 'get' (one column for rate and one column for death)
1 2 3 4 5 6 7 8 9 10 11 12 |
dir_file |
allow a different dataset to be read: directory to aggregate final |
c_iso |
country iso, if NULL, returns all isos, default to NULL |
year_range |
a vector of years, default to 1990: 2019 |
get |
default to "rate". Choose among "rate", "death", or "both" |
idvars |
default to "'OfficialName', 'ISO3Code'", what id vars you want to include |
sex |
Sex column value: Total, Female or Male, if left as NULL as default will be determined from directory of 'dir_file' |
format |
Choose format among raw, long, wide_year, wide_ind, and wide_get, default to "long". All the wide-format just 'dcasts' the long-format data, wide_get means two columns: rate and death |
round_digit |
digits to round estimates, default to 1 |
use_IGME_year |
load the saved IGME final aggregated results (final): 2019 or 2020 |
quantile |
TRUE: return upper, median, lower; FALSE: only median |
a data.table
1 2 | dt_1 <- get.CME.UI.data(use_IGME_year = 2020, format = "wide_year")
dt_2 <- get.CME.UI.data(format = "wide_ind")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.