Incidence by preferred term and treatment arm (or severity grade), shaded by rate and annotated with counts.

geom_ae_heatmap(mapping = NULL, data = NULL, label = TRUE, label_size = NULL)

Arguments

mapping, data

Standard layer overrides. Map the arm/grade to x, the AE term to y, and the incidence to size.

label

Annotate each cell with its value.

label_size

Annotation size in px.

Value

A Layer to add with +.

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()
#> <ggnext plot>
#>   data:  9 x 3
#>   aes:   x = arm, y = ae, size = pct
#>   layers: 1 
#>   coord: cartesian
#>   mode:  static