Plot the etiologies of a computed CHAMPS table
plot_top_etiol_by_age(x, etiologies = NULL, top = 6, bar_width = 0.5)
A data object obtained from
The etiologies to include in the graphic with their shortened names as a named vector. Defaults to NULL. If NULL than the top variable is used and the names are shortened automatically.
The number of etiologies to include in the graphic
defines the size of the bar the chart. Defaults to 0.5.
mock_top_etiol_by_age <- calc_top_etiol_by_age(mock, age_groups = c( "Death in the first 24 hours", "Early Neonate (24-72 hours)", "Early Neonate (72+hrs to 6 days)", "Late Neonate (7 to 27 days)")) plot_top_etiol_by_age(mock_top_etiol_by_age)