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_dta leads to immediate R crash #79

Closed
jon-mellon opened this Issue Jun 23, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@jon-mellon
Copy link

jon-mellon commented Jun 23, 2015

When I try reading a .dta file into R using read_dta, it causes a complete crash of R.
The following minimal file causes this crash:
https://github.com/jon-mellon/mellonMisc/blob/master/data/panel_leader.dta

Details of my system are below. Note that I am using Rstudio version 0.98.1103
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 2.0
year 2015
month 04
day 16
svn rev 68180
language R
version.string R version 3.2.0 (2015-04-16)
nickname Full of Ingredients

Sys.info()
sysname release version nodename machine
"Windows" "7 x64" "build 9200" "JON-SURFACE" "x86-64"
login user effective_user
"Jon" "Jon" "Jon"

@jon-mellon

This comment has been minimized.

Copy link

jon-mellon commented Jun 23, 2015

Note that I suspect the issue is with this dataset, but it's not an issue that is causing any known problems with stata or SPSS, so I suspect many files out there may suffer from these issues too.

hadley added a commit that referenced this issue Jun 23, 2015

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Jun 23, 2015

I've fixed the crash, but I'm not sure I'm getting the correct value.

What value do you see in stata for generalElectionVotePostOthW5 in row 41838?

@jon-mellon

This comment has been minimized.

Copy link

jon-mellon commented Jun 23, 2015

My file only has 41837 rows (excluding headers). If you mean row 41837 (the last row in the file), then running:

list generalElectionVotePostOthW5 if id==34803

gives

       | g~tOthW5 |
       |----------|
41837. |          |
@jon-mellon

This comment has been minimized.

Copy link

jon-mellon commented Jun 23, 2015

By the way, I was getting a related error when trying to read in the SPSS version of this file as well. Do you want me to open up a separate issue or will it be sorted by this one?

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Jun 23, 2015

Ok so that variable uses both __NA__ and nothing to represent missing values?

The SPSS issue will probably be fixed as well, but please try it out with the dev version and let me know if it doesn't work

@hadley hadley closed this Jun 23, 2015

hadley added a commit that referenced this issue Jun 23, 2015

@jon-mellon

This comment has been minimized.

Copy link

jon-mellon commented Jun 23, 2015

Yes, the __NA__ items are created by the survey company, the blanks are the result of merging versions of the datasets (where the question wasn't asked to all respondents in all waves).

@lock lock bot locked and limited conversation to collaborators Jun 27, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.