I am using the venneuler package from R to draw Venn diagrams of my data set, which is big (53.6 MB altogether).
If this helps, my code is:
library(venneuler)
albert <- read.table("Albert/proliferating_v_senescent.nucleotides")
metilene <- read.table("Metilene_v0.2-5/proliferating_v_senescent.nucleotides")
albert <- as.character(albert[,1])
metilene <- as.character(metilene[,1])
elements <- c(albert,metilene)
sets <- c(rep("albert",times = length(albert)),c(rep("metilene",times=length(metilene))))
m <- data.frame(elements = elements, sets = sets)
rm(metilene)
rm(albert)
v <- venneuler(m)
Running this R script throws an error:
Error in .jnew("edu/uic/ncdm/venn/data/VennData", as.character(combinations[, :
Java Exception <no description because toString() failed>.jnew("edu/uic/ncdm/venn/data/VennData", as.character(combinations[, 1]), as.character(combinations[, 2]))<S4 object of class "jobjRef">
I have not used java before, and I have no idea what's causing this. I couldn't find this error on a Google search.
When I run this from the linux terminal, I get a completely different error:
Error in .jnew("edu/uic/ncdm/venn/data/VennData", as.character(combinations[, :
java.lang.OutOfMemoryError: GC overhead limit exceeded
Calls: venneuler -> .jnew -> .External
I do see this error here Handling java.lang.OutOfMemoryError when writing to Excel from R but I don't understand how to implement their solution in R.
Namely, something like this "-Xmx2048M" but I don't understand how to implement this.
thanks