mattroumaya / surveymonkey

Access your SurveyMonkey data directly from R!
https://mattroumaya.github.io/surveymonkey/
Other
42 stars 10 forks source link

Duplicate answer choices cause factorization to choke #48

Closed sfirke closed 4 years ago

sfirke commented 4 years ago

Survey 151062350 won't parse:

Error in levels<-(*tmp*, value = as.character(levels)) : factor level [17] is duplicated

Looks like in the design phase of the survey, the same choices got entered more than once on different rows? I'm surprised SurveyMonkey allows that. At any rate, while a respondent now only sees ~20 choices for question 72351265, there are 164 (!) possible values stored in the levels, some of which appear twice. I'll resolve by calling unique on the possible values.