-1

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

Community
  • 1
  • 1
con
  • 5,767
  • 8
  • 33
  • 62
  • This example is not reproducible, as nobody else has access to your data. Please include example data in the question which can be run by others. – Matthew Lundberg May 21 '16 at 02:36
  • 1
    To raise the memory use `rJava::.jinit(parameters="-Xmx2g")` or similar before you load `venneuler`. Alternatively, you can use `option(java.parameters="-Xmx2g")`. In general, ask the author directly, you get answers much faster. – Simon Urbanek Jun 17 '16 at 02:42

1 Answers1

0

The solution here is to use the venn command contained within the gplots package, which works very easily. I don't know why venneuler didn't work.

con
  • 5,767
  • 8
  • 33
  • 62