Skip to content

Instantly share code, notes, and snippets.

@srgist
srgist / gist:6338396
Created August 26, 2013 05:51
Venn Diagram in R
circle <- function(x, y, r, ...) {
ang <- seq(0, 2*pi, length = 100)
xx <- x + r * cos(ang)
yy <- y + r * sin(ang)
polygon(xx, yy, ...)
}
venndia <- function(A, B, C, getdata=FALSE, ...){
cMissing <- missing(C)
if(cMissing){ C <- c() }