Quickstart: R
eulerr is the R binding: the original package, now backed by the eunoia engine. You hand euler() a named vector of set sizes, it fits an area-proportional diagram, and plot() draws it with grid graphics.
The diagram fitted by the first example below.
Install
CRAN ships binary builds, so no Rust toolchain is needed. (Installing from source does require rustc ≥ 1.88; see the package README.)
Fit a Diagram
fit <-
fit # prints the residual table and goodness-of-fit metrics
The input is a named numeric vector. Names are combination expressions: a single set (A) or sets joined with & ("A&B"). Values are disjoint (exclusive) by default: the part of A outside B is 5, the overlap is 1.5. Pass input = "union" if your numbers are full set sizes instead.
fit carries the fitted geometry and fit statistics:
fit$shapes # data frame of fitted geometry for the selected shape
fit$stress # goodness-of-fit (venneuler-style)
fit$diagError # largest single-region error
Pick a Different Shape
fit <-
shape is one of "circle" (default), "ellipse", "square", "rectangle", or "rotated_rectangle". Ellipses are more flexible and often fit three or more sets noticeably better. Rotated rectangles add an angle to the width and height and use derivative-free fitting; see Shapes.
Customize the Plot
plot() takes styling arguments for fills, edges, labels, and quantities:
Venn Diagrams
For a fixed, non-proportional Venn template (every intersection shown regardless of size), use venn():
# three-set Venn
# same, by set count
venn() defaults to ellipses, supporting up to five sets. Rotated rectangles support up to four sets.
Next Steps
Read the introductory vignette and the full reference on the eulerr website. For how the fit works across all bindings, see the Fitter Pipeline and Goodness of Fit chapters.
