tidyverse / haven

Read SPSS, Stata and SAS files from R
https://haven.tidyverse.org
Other
424 stars 117 forks source link

Unable to allocate memory when opening a dta file #734

Open mizuwatershui opened 1 year ago

mizuwatershui commented 1 year ago

Hi there,

Thank you for your awesome package. Previously, I used "haven" to open a .dta file without any problems, but now I get an "Unable to allocate memory" error. The file is only 137 MB, so I don't think size is the issue.

I recently updated both R and RStudio. I'm not sure if that's related, but I thought I'd mention it. I'm using RStudio version 2023.06.2+561 and R version 4.3.1 (2023-06-16). I also tried to install the 1.1.0 version of "haven", but it didn't help.

Thanks again!

> #Read STATA data in R
> library(haven)
> mydata<-read_dta("/Users/Desktop/Desktop/Research 2023/paper new analysis/Student and case.dta")
Error: Failed to parse /Users/Desktop/Desktop/Research 2023/paper new analysis/Student and case.dta: Unable to allocate memory.
hadley commented 1 year ago

Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you! If you've never heard of a reprex before, start by reading about the reprex package, including the advice further down the page. Please make sure your reprex is created with the reprex package as it gives nicely formatted output and avoids a number of common pitfalls.