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

read_delim() and C stack usage too close to limit #825

Closed
benzipperer opened this issue Apr 3, 2018 · 1 comment
Closed

read_delim() and C stack usage too close to limit #825

benzipperer opened this issue Apr 3, 2018 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@benzipperer
Copy link

Hi, when I try to use read_delim to import a space delimited file, I receive the error

library(readr)
new_data <- read_delim('nlsy97_all_1997-2013.dat',delim=' ')
Error: C stack usage  13203400 is too close to the limit

You can download the data here. The .dat file above is about 6GB. Can anyone reproduce this error?

How can I help solve this problem?

@jimhester jimhester added the bug an unexpected problem or unintended behavior label Apr 4, 2018
@jimhester
Copy link
Collaborator

jimhester commented Apr 4, 2018

This dat file contains 230298 columns and 8983 rows. readr seems to have particularly bad performance with very wide, shallow data like this, and potentially a bug in this case as well. For this particular problem where all the values are integers you might want to just use base::scan().

new_data <- scan("nlsy97_all_1997-2013.dat", what = integer())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants