Learn R Programming

⚠️There's a newer version (7.0.4) of this package.Take me there.

eulerr

eulerr generates area-proportional Euler diagrams that display set relationships (intersections, unions, and disjoints) with circles or ellipses. Euler diagrams are Venn diagrams without the requirement that all set interactions be present (whether they are empty or not), which means that, depending on input, eulerr sometimes produces Venn diagrams and sometimes not.

With three or more sets intersecting, exact Euler diagrams are often impossible. For such cases eulerr attempts to provide a good approximation by numerically tuning the parameters of the ellipses or circles to minimize the error in the resulting diagram. Residuals and goodness of fit statistics are provided to assess whether the resulting diagram can be trusted.

Installation

CRAN version

install.packages("eulerr")

Development version

devtools::install_github("jolars/eulerr")

Shiny app

eulerr is also available as a shiny app hosted at eulerr.co.

Usage

library(eulerr)
# From Wilkinson 2012
fit <- euler(c("A" = 4, "B" = 6, "C" = 3, "D" = 2, "E" = 7, "F" = 3,
               "A&B" = 2, "A&F" = 2, "B&C" = 2, "B&D" = 1,
               "B&F" = 2, "C&D" = 1, "D&E" = 1, "E&F" = 1,
               "A&B&F" = 1, "B&C&D" = 1),
             shape = "ellipse")

We can inspect the goodness-of-fit metrics diagError and stress for the solution,

fit$stress
#> [1] 0.0001957608
fit$diagError
#> [1] 0.002251973

and plot it

plot(fit)

Please see the introductory vignette for a brief introduction or eulerr under the hood for details.

License

eulerr is open source software, licensed under GPL-3.

Versioning

eulerr uses semantic versioning.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Acknowledgements

eulerr would not be possible without Ben Frederickson’s work on venn.js or Leland Wilkinson’s venneuler.

Copy Link

Version

Install

install.packages('eulerr')

Monthly Downloads

7,561

Version

5.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Larsson

Last Published

February 4th, 2019

Functions in eulerr (5.1.0)

get_constraints

Set up constraints for optimization
fruits

Fruits
is_integer

Check if a vector is an integer
compress_layout

Compress an Euler layout
eulerr_deprecated

Deprecated functions in package eulerr.
eulerr_default_options

Default options for eulerr
plot.euler

Plot Euler and Venn diagrams
plants

Plants
get_bounding_box

Get the bounding box of an ellipse
mix_colors

Blend (average) colors
is_false

Check if object is strictly FALSE
normalize_angle

Normalize an angle to [-pi, pi)
fitted.euler

Fitted values of euler object
setup_gpar

Setup gpars
setup_geometry

Compute geometries and label locations
eulerr_options

Get or set global graphical parameters for eulerr
rescale

Rescale values to new range
is_real

Check if vector is a real (numeric non-integer)
n_sets

Get the number of sets in he input
organisms

Organisms
skyline_pack

Skyline packing algorithm
pain

Pain distribution data
separate_two_discs

Optimize Distance Between Circles Based On Overlap
setup_grobs

Grobify Euler objects
normalize_pars

Normalize parameters (semiaxes and rotation)
print.euler

Print a summary of an Euler diagram
print.venn

Print a summary of a Venn diagram
plot.eulergram

Print (plot) Euler diagram
poly_clip

Polygon Clipping
regionError

regionError
replace_list

Replace (refresh) a list
update_list

Update list with input
venn

Venn diagrams
stress

Stress
tally_combinations

Tally set relationships
diagError

diagError
coef.euler

Return ellipses from the euler object
dummy_code

Dummy code a data.frame
ellipse

Plotting coordinates for an ellipse
error_plot

Error plot for euler objects
bit_indexr

Binary indices
center_layout

Center ellipses
euler

Area-proportional Euler diagrams
eulerr-package

eulerr: Area-Proportional Euler and Venn Diagrams with Ellipses