forked from jolars/eulerr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
104 lines (76 loc) · 3.26 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
dev = "png"
)
```
# eulerr
[![Travis-CI Build Status](https://travis-ci.org/jolars/eulerr.svg?branch=master)](https://travis-ci.org/jolars/eulerr)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/jolars/eulerr?branch=master&svg=true)](https://ci.appveyor.com/project/jolars/eulerr)
[![Coverage Status](https://coveralls.io/repos/github/jolars/eulerr/badge.svg?branch=master)](https://coveralls.io/github/jolars/eulerr?branch=master)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/eulerr)](https://cran.r-project.org/package=eulerr)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KERLYHUY639WU)
**eulerr** generates area-proportional Euler diagrams that display set
relationships (intersections, unions, and disjoints) with circles or ellipses.
[Euler diagrams](https://en.wikipedia.org/wiki/Euler_diagram) 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
```{r install_cran, eval = FALSE}
install.packages("eulerr")
```
### Development version
```{r install_github, eval = FALSE}
devtools::install_github("jolars/eulerr")
```
### Shiny app
eulerr is also available as a shiny app hosted at
[eulerr.co](http://eulerr.co).
## Usage
```{r specification}
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,
```{r}
fit$stress
fit$diagError
```
and plot it
```{r plot_method}
plot(fit)
```
Please see [the introductory vignette](https://CRAN.R-project.org/package=eulerr/vignettes/introduction.pdf)
for a brief introduction or [*eulerr under the hood*](https://CRAN.R-project.org/package=eulerr/vignettes/under-the-hood.pdf)
for details.
## License
eulerr is open source software, licensed under [GPL-3](LICENSE).
## Versioning
eulerr uses [semantic versioning](http://semver.org).
## Code of conduct
Please note that this project is released with a
[Contributor Code of Conduct](CONDUCT.md). 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](http://www.benfrederickson.com) or Leland Wilkinson's
[venneuler](https://cran.r-project.org/package=venneuler).