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

RStudio crash on importing stata file #600

Closed
sjkiss opened this issue May 12, 2021 · 4 comments
Closed

RStudio crash on importing stata file #600

sjkiss opened this issue May 12, 2021 · 4 comments

Comments

@sjkiss
Copy link

sjkiss commented May 12, 2021

There is a GitHub repo here that replicates the problem, but this code will do so as well.
On reading in the Stata file, RStudio crashes immediately. I note that this happened in another issue

library(haven)
out<-read_dta(file="https://github.com/sjkiss/ces19/raw/main/2019%20Canadian%20Election%20Study%20-%20Online%20Survey%20v1.0.dta")

Results from SessionInfo()

R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] haven_2.4.1.9000

loaded via a namespace (and not attached):
 [1] compiler_4.0.4  ellipsis_0.3.2  magrittr_2.0.1  hms_1.0.0       tools_4.0.4     pillar_1.6.0   
 [7] tibble_3.1.1    crayon_1.4.1    utf8_1.2.1      fansi_0.4.2     vctrs_0.3.8     forcats_0.5.1  
[13] lifecycle_1.0.0 pkgconfig_2.0.3 rlang_0.4.11 
@rachaelmburke
Copy link

I am also having the exact same issue as described above. The files used to work fine, but not they crash R immediately.

@jobreu
Copy link

jobreu commented Jun 30, 2021

Same problem here. The R session is aborted in RStudio when I try to read a .dta file using read_dta(). I am using R version 4.1.0 and haven version 2.4.1 with Windows 10 as OS. The file has been generated with Stata version 15. This Stackoverflow post suggests that this may be related to changes in ReadStat.

@gorcha
Copy link
Member

gorcha commented Jul 25, 2021

Hi all, It looks like the bug in #79 was re-introduced following some other updates.
I've put together a simple fix, will chuck a PR up shortly.

@DaniMori
Copy link

Issue #620 is a duplicate of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants