Description Usage Arguments Value See Also Examples
View source: R/prepare_df_plot.R
This function is used internally by plot_tb_burden
and plot_tb_burden_overview
to prepare data for plotting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
df |
Dataframe of TB burden data, as sourced by |
dict |
A tibble of the data dictionary. See |
metric |
Character string specifying the metric to plot |
conf |
Character vector specifying the name variations to use to specify the upper
and lower confidence intervals. Defaults to |
metric_label |
Character string specifying the metric label to use. |
countries |
A character string specifying the countries to target. |
years |
Numeric vector of years. Defaults to |
compare_to_region |
Logical, defaults to |
facet |
Character string, the name of the variable to facet by. |
annual_change |
Logical, defaults to |
trans |
A character string specifying the transform to use on the specified metric. Defaults to no
transform ("identity"). Other options include log scaling ("log") and log base 10 scaling
("log10"). For a complete list of options see |
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 list containing 3 elements, the dataframe to plot, the facet to use and the label to assign to the metric axis.
plot_tb_burden plot_tb_burden_overview
1 | prepare_df_plot(countries = "Guinea")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.