0

I am getting the

OutOfMemoryError (Java): Java Heap Space

error repeatedly. I checked online and tried using command options (java.parameters="-Xmx2g"). Also, I have tried other Gigs like 4, 8, 1.5 etc, and nothing seems to work.

Is there a way to check if the command of changing the heap space actually works? I know that xlcMemoryReport doesn't actually show you the amount of RAM you have allocated.

Qiu
  • 5,651
  • 10
  • 49
  • 56
PABLO G
  • 1
  • 1
  • 3
  • By default R does not use Java. Which package do you use which exhibits this behaviour? – Gábor Bakos May 25 '15 at 18:15
  • Hi @GáborBakos thank you for the response. I used these two packages: XLConnect and rJava. Any advice on what can be done? – PABLO G May 25 '15 at 18:23
  • 2
    @PABLO G You should add your actual code to the question. Try looking into the `XLConnect` functions `xlcMemoryReport` and `xlcFreeMemory`. – nrussell May 25 '15 at 18:47
  • Is the "g" recognized? Try "m" at the end. You can increase the memory available to java in the options (in R). Typically like this: options(java.parameters = "-Xmx1000m") – lawyeR May 25 '15 at 20:10