Learn R Programming

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

eulerr

eulerr generates area-proportional euler diagrams that display set relationships (intersections, unions, and disjoints) with circles. 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 circles' positions and radii so that the sum of squared errors is minimized. 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 jolars.co/eulerr.

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] 2.698483e-18
fit$diagError
#> [1] 4.915473e-10

and plot it

plot(fit)

Please see the introductory vignette for usage 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.

Thanks

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

3,511

Version

3.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Larsson

Last Published

November 15th, 2017

Functions in eulerr (3.0.0)

center_layout

Center Circles
prepanel.euler

Prepanel Function for Euler Diagrams
euler

Area-Proportional Euler Diagrams
print.euler

Print Euler Fits
eulerr-package

eulerr: Area-Proportional Euler and Venn Diagrams with Circles or Ellipses
panel.euler.circles

Panel Function for Euler Circles
get_bounding_box

Get the bounding box of an ellipse
panel.euler.ellipses

Panel Function for Euler Ellipses
get_constraints

Set up constraints for optimization
n_sets

Get the number of sets in he input
compress_layout

Compress a Euler Layout
diagError

diagError
panel.euler

Panel Function for Euler Diagrams
dont_plot

Suppress Plotting
panel.euler.labels

Panel Function for Euler Diagram Labels
dont_print

Suppress Printing
plot.euler

Plot Area-Proportional Euler Diagrams
shelf_pack

Shelf packing algorithm for packing rectangles in a bin.
skyline_pack

Skyline packing algorithm
is_false

Check If Object Is Strictly FALSE
tally_combinations

Tally Set Relationships
label

Compute locations for overlaps
update_list

Update a List with User Input
rescale

Rescale Values to a New Range
separate_two_discs

Optimize Distance Between Circles Based On Overlap
qualpalr_pal

Set up a Qualitative Color Palette
regionError

regionError
bit_indexr

Binary indices