title: R writing excel file with XLSX package taking a long time and error
body: <p>The "mydata" data frame has 128,000 rows. When I write it to an xlsx file it just keep running and when I stop it I get the error:</p>
  
  <pre><code>write.xlsx(x = mydata, file = "myfile.xlsx",
             sheetName = "Sheet1", row.names = FALSE)
  
  
  
  
  
  Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  : 
    java.lang.OutOfMemoryError: Java heap space
  </code></pre>
  
  <p>Do you know what this means?</p>