0

I'm currently trying to import a 42mb .xlsx file into R with 'gdata', it's brought my laptop churning to a halt. I'm wondering whether it would be quicker to convert to CSV and then try to import it into R?

Barnaby Hussey-Yeo
  • 647
  • 2
  • 8
  • 15
  • 6
    Yes, csv would be quicker. Also, check out the `data.table` package, which has a `fread` function to help you with large files. – Fernando Oct 09 '14 at 15:06
  • Some tips here http://stackoverflow.com/questions/1727772/quickly-reading-very-large-tables-as-dataframes-in-r. – Fernando Oct 09 '14 at 15:41
  • If there are reasons you'd prefer to keep your files in xlsx format, you could try `read.xlsx` or `read.xlsx2` (which is faster), both from the `xlsx` package. I've never done time comparisons, but 42 mb isn't a particularly large file, so maybe `xlsx` will be good enough if you prefer to stick with Excel format. – eipi10 Oct 09 '14 at 15:45

1 Answers1

3

Importing as a CSV is orders of magnitude faster.

Barnaby Hussey-Yeo
  • 647
  • 2
  • 8
  • 15