-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Intermittent error: "duplicated values in labels" #104
Comments
Hello! dupl_levels = function(df){
res = lapply(df, attr, 'levels')
dupl_levels = sapply(res, anyDuplicated)
res[dupl_levels>0]
} And could you try to detect the column which caused the error? To do this you need to remove variables from your code for the table one by one and find after which variable the code will stop raising an error. |
Thank you for your reply. I'm reading in an SPSS .sav dataset exported from IncQuery using haven::read_sav(). I've previously done the same with .sav files from other sources without issue. Your function does not identify any duplicated factor levels in my data (it returns a list of length 0). I also have no way of reliably determining which column is throwing an error because the error occurs intermittently: the same code will sometimes run and sometimes not not run -- without making any changes to the code. |
Could you provide the result of |
The same as #107. |
The same as #107. Closed as duplicated. |
Hello!
In using expss to tabulate survey data, I am receiving the error message below intermittently. By "intermittent" I mean that when this error occurs, I can simply re-run the example code (also below) and often obtain the desired tabulation. For context, all of the columns in data.2 being tabulated are factors (I am not at liberty to share the data).
This is rather a strange behavior that I haven't encountered with expss before. Why would unchanged code produce varying results -- sometimes returning an error message and sometimes returning the desired tabulation?
Thank you in advance for any insight on what might be causing this.
The text was updated successfully, but these errors were encountered: