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?

3
  • 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
    Commented Oct 9, 2014 at 15:06
  • Some tips here stackoverflow.com/questions/1727772/….
    – Fernando
    Commented Oct 9, 2014 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
    Commented Oct 9, 2014 at 15:45

1 Answer 1

3

Importing as a CSV is orders of magnitude faster.

Not the answer you're looking for? Browse other questions tagged or ask your own question.