% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-clinical.R
\name{geom_ae_heatmap}
\alias{geom_ae_heatmap}
\title{Adverse-event incidence heatmap}
\usage{
geom_ae_heatmap(mapping = NULL, data = NULL, label = TRUE, label_size = NULL)
}
\arguments{
\item{mapping, data}{Standard layer overrides. Map the arm/grade to \code{x},
the AE term to \code{y}, and the incidence to \code{size}.}

\item{label}{Annotate each cell with its value.}

\item{label_size}{Annotation size in px.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
Incidence by preferred term and treatment arm (or severity grade),
shaded by rate and annotated with counts.
}
\examples{
d <- expand.grid(arm = c("Placebo", "Low", "High"),
                 ae = c("Nausea", "Fatigue", "Headache"))
d$pct <- c(5, 12, 22, 8, 15, 26, 3, 6, 11)
ggnext(d, aes(arm, ae, size = pct)) + geom_ae_heatmap()
}
