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

Missing variable type in sav files #23

Closed
dgromer opened this issue Feb 25, 2015 · 2 comments
Closed

Missing variable type in sav files #23

dgromer opened this issue Feb 25, 2015 · 2 comments

Comments

@dgromer
Copy link

dgromer commented Feb 25, 2015

When writing a sav file using

data <- data.frame(Var = c(1, 2, 3))
haven::write_sav(data, "numeric_haven.sav")

in the resulting file, the variable does not have any type (should be numeric). Maybe the reason is me using a German version of SPSS, that expects "," as decimal separator instead of "."?

Here's the file written with haven:
https://github.com/dgromer/misc/blob/master/numeric_haven.sav

and how it should look like (created with SPSS):
https://github.com/dgromer/misc/blob/master/numeric_spss.sav

@evanmiller
Copy link
Collaborator

This issue should be fixed with this ReadStat commit:

WizardMac/ReadStat@9bc3ad1

@hadley hadley closed this as completed in f887751 Feb 25, 2015
@dgromer
Copy link
Author

dgromer commented Feb 25, 2015

Yes, works for me when using the updated version of readstat_sav_write.c, thanks!

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants