-
Notifications
You must be signed in to change notification settings - Fork 69
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
Ordered factor conversion for multiple choice question #342
Comments
Hmmmmm, I might need more information to understand what you are saying. Take a look at this example survey: https://conjoint.qualtrics.com/jfe/form/SV_3gbwq8aJgqPwQDP That first question is multiple choice, and when I look at
For this question, |
Thanks @juliasilge, I realize this isn't much to go on. I'm having difficulty creating a reprex because I don't have a Qualtrics account with my organization and I don't have API access with my free account. The problem appears for questions where Recode Values and Variable Names are both checked and the names don't match the levels in the question. The "choiceText" returned by fetch_survey matches the capitalized values in the screenshot, while the responses come back from the API with the variable names. This error only happens when label and convert are both T, because it calls infer_data_types. I suspect that responses are returned from the export-responses endpoint with "variableName" levels if they exist, otherwise "choiceText". I know this is a lot to ask, but is that enough to make a reprex? |
It looks like the wrap_mc function in the utils.R script uses "choiceText" from the survey metadata as the factor levels, which isn't guaranteed to match the response values returned from fetchsurveys. This causes an error if, for example, the choice text has a capital letter in it, but the variable name does not. It seems like "variableName" would be a better choice for the levels, though I am new to Qualtrics, so I may be misinterpreting these values.
qualtRics/R/utils.R
Line 363 in 72bde4e
The text was updated successfully, but these errors were encountered: