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 produce 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 radiuses so that the sum of squared errors is minimized.

When solutions are approximate, residuals and error statistics are provided to assess whether the resulting diagram can be trusted.

Installation

The CRAN version can be installed by running

install.packages("eulerr")

The development version can be installed by running

devtools::install_github("jolars/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", "Google Scholar"), 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 Fredrickson's work on venn.js or Leland Wilkinson's venneuler.

Copy Link

Version

Install

install.packages('eulerr')

Monthly Downloads

3,665

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Johan Larsson

Last Published

February 5th, 2017

Functions in eulerr (1.1.0)

plot.euler

Plot euler diagrams
print.euler

Print euler fits
euler

Area-Proportional Euler Diagrams
eulerr

Area-Proportional Euler Diagrams (deprecated)