Hi I'm new to R and I must use it to make a venn diagram. I've been googling it for a while and all the examples I could find deal with binary variables. However I have 2 lists (well actually 2 csv files). The items in the list are just strings, like PSF113_xxxx. I must compare them to see what is unique to each and what is shared. How would I make a venn diagram out of this in R?
Also the files don't have the same number of things in them, one has slightly more then the other, which means the cbind function returns an error.
I've come up with this so far, but this just gets me an image with a circle named group 1 with a 1 inside and a 0 outside.
matLis <- list(matrix(A), matrix(B))
n <- max(sapply(matLis, nrow))
do.call(cbind, lapply(matLis, function (x)
rbind(x, matrix(, n-nrow(x), ncol(x)))))
x = vennCounts(n)
vennDiagram(x)
This is an example of the data
2 PSF113_0018
3 PSF113_0079
4 PSF113_0079a
5 PSF113_0079b
The numbering on the left isn't anything I've done, it added that when I imported the files into R from excel
head(A)
> head(A)
V1
1 PSF113_0016a
2 PSF113_0018
3 PSF113_0079
4 PSF113_0079a
5 PSF113_0079b
6 PSF113_0079c
> head(b,10)
V1
1 PSF113_0016a
2 PSF113_0021
3 PSF113_0048
4 PSF113_0079
5 PSF113_0079a
6 PSF113_0079b
7 PSF113_0079c
8 PSF113_0295
9 PSF113_0324a
10 PSF113_0324b