Search code examples
rvenn-diagram

Venn Diagram with Item labels


Suppose I have two vectors

foo <- c('a','b','c','d')
baa <- c('a','e','f','g')

Does anyone know of a way to produce a venn diagram but have the vector items visualised within the diagram.

Like so? (made in powerpoint) enter image description here


Solution

  • Using the RAM package:

    library(RAM)
    foo <- c('a','b','c','d')
    baa <- c('a','e','f','g')
    group.venn(list(foo=foo, baa=baa), label=TRUE, 
        fill = c("orange", "blue"),
        cat.pos = c(0, 0),
        lab.cex=1.1)
    

    enter image description here