Skip to contents

Counts the most frequent values of a diagnosis/coding column and draws a horizontal bar chart in the Hugo Coder look. Title-less by design – the name lives in the card header and the export filename, not in the plot.

Usage

zhn_plot_diagnoses(data, col, n = 20, transparent = FALSE, ylab = "Anzahl")

Arguments

data

A data frame (typically the filtered cohort).

col

Name of the diagnosis/coding column to count.

n

Number of top categories to show.

transparent

Passed to zhn_theme().

ylab

Count-axis label.

Value

A ggplot2::ggplot object.