-
Notifications
You must be signed in to change notification settings - Fork 117
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
Error in if (any(bad_labels)) { : missing value where TRUE/FALSE needed with write_dta #427
Comments
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 "What is a reprex", and follow 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. |
The link you provided is a 404, so I hope I did it right: library(haven)
data1 <- read_sav("./spss/prgautp1.sav")
write_dta(data1, "./piaac.dta")
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Warning in is_integerish(attr(x, "labels")): NAs introduced by coercion to
#> integer range
#> Error in if (any(bad_labels)) {: missing value where TRUE/FALSE needed Created on 2019-12-02 by the reprex package (v0.3.0) |
I can't download that file, so unfortunately I can't look into it. |
Hi!
I successfully imported this SPSS file
http://vs-web-fs-1.oecd.org/piaac/PUF-Data/SPSS/prgautp1.sav. But then I tried to export it as a dta file and encountered the following error: "Error in if (any(bad_labels)) { : missing value where TRUE/FALSE needed"
My code:
library(haven)
library(plyr)
data1 <- read_sav("./spss/prgautp1.sav")
write_dta(data1, "./piaac.dta")
R version 3.5.1
haven version 2.0.0.9000 468bff2
The text was updated successfully, but these errors were encountered: