Plot the etiologies of a computed CHAMPS table

plot_top_etiol_by_age(x, etiologies = NULL, top = 6, bar_width = 0.5)

Arguments

x

A data object obtained from calc_top_etiol_by_age.

etiologies

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.

top

The number of etiologies to include in the graphic

bar_width

defines the size of the bar the chart. Defaults to 0.5.

Examples

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)