agitated: An alternative to the UpSetR package for upset plots.

Description Usage Arguments Value agitated functions References Examples

View source: R/agitated.R

Description

A lightweight (and reasonably efficient) alternative to the UpSetR package. These plots allow visualisation of an arbitrary number of set interactions (see http://doi.org/gbjxr9).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
agitated(
  x,
  nsets = 20,
  exclusive = TRUE,
  intersection_order = c("frequency", "degree"),
  sort_sets = TRUE,
  title = NULL,
  subtitle = NULL,
  return_plots = FALSE
)

Arguments

x

A list or presence/absence matrix.

nsets

Numeric scalar specifying the maximum number of sets to be shown.

exclusive

Logical scalar controlling whether the intersections should be exclusive.

intersection_order

Character scalar controlling whether sorting of intersections is done by "frequency" (size of intersection) or "degree" (number of intersecting sets).

sort_sets

Logical scalar controlling whether the input sets are re-ordered based on descending size.

title, subtitle

Character scalars specifying plot title and subtitle.

return_plots

Logical scalar specifying whether the ggplot2 objects should be returned directly (TRUE) or if plot_grid should be called on these objects instead.

Value

If return_plots = TRUE, the function returns a list of three ggplot2 objects. If return_plots = TRUE, the function calls plot_grid on the plot objects.

agitated functions

agitated: produce an upset plot

References

UpSetR: an R package for the visualization of intersecting sets and their properties Jake R Conway, Alexander Lex, Nils Gehlenborg <doi:10.1093/bioinformatics/btx364>.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data <- agitated:::example_data()
agitated(data)

agitated(data, nsets = 10)

agitated(data, exclusive = FALSE)

agitated(data, intersection_order = "degree")

agitated(data, sort_sets = FALSE)

agitated(data, title = "title", subtitle = "subtitle")

Alanocallaghan/agitated documentation built on July 29, 2021, 7:22 p.m.