Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: std::bad_alloc #150

Closed
nortonle opened this issue Dec 10, 2015 · 3 comments
Closed

Error: std::bad_alloc #150

nortonle opened this issue Dec 10, 2015 · 3 comments

Comments

@nortonle
Copy link

I am not sure if this is my laptop problems or the package problem. The problem occurs when I am reading 9 excel files, each file contain data in sheet number 2, each sheet contains exactly 65.000 records. After reading one file, the file will be rbind to the previous one.

Here is the code
client_2 <- do.call(rbind, lapply(filenames, read_excel, col_names = T, sheet = 2))

Currently, I am using R 3.2.2 on Windows 7 32bit, 4GB RAM. This is my workplace laptop so I can upgrade to 64bit of Windows.

Would you please tell me if this is my laptop problem or the package problem?

@audiolion
Copy link

I have recently gotten this issue too, win 7 R 3.2.3, 64 bit and 8gb ram. I believe it comes from reading too many rows, I think there is a point where readxl somehow can't allocate enough space in memory or whatever structure holding the data is too large to read it all in. I am going to do some testing and figure out if I can pinpoint the bottleneck in the code.

@vladdsm
Copy link

vladdsm commented Aug 2, 2016

Same for me. Now reading files containing 52k rows has got an issue. Closing and re-opening Rstudio solves the problem

@jennybc
Copy link
Member

jennybc commented Mar 1, 2017

readxl appears to work reasonably well for a wide range of spreadsheets and available RAM, but you've obviously found some uncomfortably large sheets / problems. @nortonle I note that 4GB RAM is not very much these days 😁.

There have been some recent changes in the development version that might improve performance, although that was not an actual goal. Please try the dev version or the next CRAN release to check. In any case, we have no immediate plans to tackle this explicitly.

@jennybc jennybc closed this as completed Mar 1, 2017
@lock lock bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants