0

I have data of 20 variables and 633,000 observations in xls file. So when i try to load this data into R i get following error.

Error: OutOfMemoryError (Java): Java heap space

I tried using

options(java.parameters = "-Xmx1000m")

But still same error.

I tried using XLConnect package.

wb = loadWorkbook("alldata.xls")

the size of data file is 63mb and my RAM size is 4GB

David Arenburg
  • 91,361
  • 17
  • 137
  • 196
Jay khan
  • 745
  • 2
  • 9
  • 22
  • What are you using in order to load it into R? I'm not familiar with error. And that data is far away from being *huge* unless you have 512 MB RAM or something. Try converting your file to `.csv` and read it using `data.table::fread` instead. OR try [the readxl](https://github.com/hadley/readxl) package on your original xls file. I think it avoid Java dependency – David Arenburg Aug 28 '15 at 07:46
  • Also this might help: http://stackoverflow.com/questions/1727772/quickly-reading-very-large-tables-as-dataframes-in-r – hugot Aug 28 '15 at 08:21
  • 1
    Save it as a `.csv` and use `read.csv` – kristang Aug 28 '15 at 09:16
  • Or save it as csv and use `fread(...)` in the `data.table` package. Extremely fast. – jlhoward Aug 28 '15 at 19:43

0 Answers0