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/shiny/eulerr.

Usage

library(eulerr)
fit <- euler(c("A" = 10, "B" = 9, "C" = 4,
               "A&B" = 2, "A&C" = 3, "B&C" = 3,
               "A&B&C" = 2))

We can inspect the solution

fit
#>       original fitted residuals region_error
#> A           10 10.044    -0.044        0.005
#> B            9  9.050    -0.050        0.005
#> C            4  4.128    -0.128        0.005
#> A&B          2  1.601     0.399        0.011
#> A&C          3  2.719     0.281        0.007
#> B&C          3  2.716     0.284        0.008
#> A&B&C        2  2.324    -0.324        0.011
#> 
#> diag_error:  0.011 
#> stress:      0.002

and plot it

plot(fit, labels = c("PubMed", "Scopus", "Embase"), main = "Databases")

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

4,127

Version

2.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Larsson

Last Published

June 20th, 2017

Functions in eulerr (2.0.0)

locate_centers

Locate Centers of Circle Overlaps
panel.euler

Panel Function for Euler Diagrams
eulerr

Area-Proportional Euler Diagrams (defunct)
is_false

Check If Object Is Strictly FALSE
center_circles

Center Circles
dont_plot

Suppress Plotting
print.euler

Print Euler Fits
qualpalr_pal

Set up a Qualitative Color Palette
dont_print

Suppress Printing
euler

Area-Proportional Euler Diagrams
plot.euler

Plot Area-Proportional Euler Diagrams
prepanel.euler

Prepanel Function for Euler Diagrams
update_list

Update a List with User Input
panel.euler.circles

Panel Function for Circles
panel.euler.labels

Panel Function for Circle Labels
rescale

Rescale Values to a New Range
tally_combinations

Tally Set Relationships