Counts, for each distinct value of vars, the set of Compare groups it
appears in, and renders an UpSet-style intersection plot via
ggupset::scale_x_upset(), optionally annotated with absolute or
percentage intersection-size labels.
Arguments
- df
A
pep_all-shaped data frame.- vars
Column (tidy-evaluated) whose distinct values define the items being compared, e.g.
Sequence.- n_intersections
Maximum number of intersections to display.
- Compare
Name (string) of the column defining the groups compared (becomes the upset's set membership axis), e.g.
"Condition".- labels
One of
"abs"(absolute intersection counts, the default),"perc"(percentage of the total), or any other value to omit the per-bar count labels entirely. Defaults to"perc".- lab.size
Text size of the per-bar count/percentage labels.
- plot.margin
Plot margin, as unit.