Description Usage Arguments Value Examples
View source: R/summarise_metric.R
This function provides a curated list of summary measures for a given TB metric in countries of interest.
It can been used to facilitate reporting and is used extensively in the TB report included in the package
(see render_country_report
). It outputs the most recent year of data in the target country for
a given metric, along with the year this data was recorded, the regional and global rank and the average change
in the last decade. For a more customisable metric summary see summarise_tb_burden
as a starting point.
1 2 3 4 5 6 7 8 9 10 |
df |
Dataframe of TB burden data, as sourced by |
metric |
Character string specifying the metric to plot |
countries |
A character string specifying the countries to target. |
conf |
Character vector specifying the name variations to use to specify the upper
and lower confidence intervals. Defaults to c("_lo", "_hi"), if set to |
download_data |
Logical, defaults to |
save |
Logical, should the data be saved for reuse during the current R session. Defaults to
|
verbose |
Logical, defaults to |
... |
Additional arguments to pass to |
A tibble containing the name of the target country, the year of the most recent data available, the most recent value for the metric, the regional rank, the global rank and the average change in the previous decade.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Get a summary of TB incidence rates for the united kingdom and germany
summarise_metric(metric = "e_inc_100k", countries = c("United Kingdom", "Germany"))
## Get a summary of case detection rates in France
summarise_metric(metric = "c_cdr", countries = "France")
## Get a summary of case detection rates in France - without confidence intervals
summarise_metric(metric = "c_cdr", countries = "France", conf = NULL)
## Provide a dataset and get summary measures from it.
tb <- get_tb_burden()
summarise_metric(df = tb, metric = "c_cdr", countries = "France")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.