I try to create a Venn Diagram with venn()
function in R. It works but I want to be able to define my own labels instead of "A"
, "B"
e.t.c... I don't understand how one do that cause there is no label argument that can be passed to the function.
EDIT: Forgot to say that I use a list of vectors which contain strings...
*EDIT2:
it is the package "venn" from gplots:
library(gplots)
Example code:
variable list_ looks like this:
> list_
[[1]]
[1] "hejsan" "pelle" "svanslov"
[[2]]
[1] "kok" "nalle" "pelle"
and then I do:
venn(list_)
which looks like this:
The venn
function takes the labels in the plot from the names of the list elements.
names(list_) <- c("First list", "Second list")
venn(list_)