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

Adding support for haven #23

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

Adding support for haven #23

wants to merge 40 commits into from

Conversation

eveyp
Copy link

@eveyp eveyp commented Nov 4, 2021

Adds support for haven when Stata version 8 and greater is used. Leave foreign in place for older versions of Stata.

Closes #14

@yanyuteng
Copy link

yanyuteng commented Apr 19, 2022

Hello eveyp, I copied from your repositoriy to read data from Stata version 15. And I first used the simple example to test it. The test codes are shown below:

x <- data.frame(a = rnorm(3), b = letters[1:3])
stata("sum a", data.in = x)

But the computation processing time is too long, and I finally interrupted it. The errors are shown below:

Error in seq.int(cutpoints[1] + 1, cutpoints[2] - 1) : 
  'from' must be a finite number

Besides, my environment is OSX M1, Stata 16. And when I used lbraglia's origin repository, those codes were working. 

@eveyp
Copy link
Author

eveyp commented Apr 19, 2022

Hey there, thanks for the reproducible example!

I have replicated this but it occurs in both my version and the main version. It looks like this is related to #19 and #25 so I think it's an issue with the main RStata code.

@josephhnath
Copy link

Hey there, thanks for the reproducible example!

I have replicated this but it occurs in both my version and the main version. It looks like this is related to #19 and #25 so I think it's an issue with the main RStata code.

I'm not sure if you're still working on this, but I was able to get things running on my computer by modifying the stata.R file to include Haven code wherever there is Foreign code, particularly for the data in/out steps.

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

Successfully merging this pull request may close these issues.

Can change foreign to haven?
3 participants