Compose an UpSet plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | upset(
data,
intersect,
base_annotations = "auto",
name = "group",
annotations = list(),
themes = upset_themes,
stripes = upset_stripes(),
labeller = identity,
height_ratio = 0.5,
width_ratio = 0.3,
wrap = FALSE,
set_sizes = upset_set_size(),
mode = "distinct",
queries = list(),
guides = NULL,
encode_sets = TRUE,
matrix = intersection_matrix(),
...
)
|
data |
a dataframe including binary columns representing membership in classes |
intersect |
which columns should be used to compose the intersection |
base_annotations |
a named list with default annotations (i.e. the intersection size barplot) |
name |
the label shown below the intersection matrix |
annotations |
a named list of annotations, each being a list with:
|
themes |
a named list of themes for components and annotations, see |
stripes |
specification of the stripes appearance created with |
labeller |
function modifying the names of the sets (rows in the matrix) |
height_ratio |
ratio of the intersection matrix to intersection size height |
width_ratio |
ratio of the overall set size width to intersection matrix width |
wrap |
whether the plot should be wrapped into a group (makes adding a tile/combining with other plots easier) |
set_sizes |
the overall set sizes plot, e.g. from |
mode |
region selection mode for computing the number of elements in intersection fragment. See |
queries |
a list of queries generated with |
guides |
action for legends aggregation and placement ('keep', 'collect', 'over' the set sizes) |
encode_sets |
whether set names (column in input data) should be encoded as numbers (set to TRUE to overcome R limitations of max 10 kB for variable names for datasets with huge numbers of sets); default TRUE for upset() and FALSE for upset_data(). |
matrix |
the intersection matrix plot |
... |
Arguments passed on to
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.