Open sfirke opened 7 years ago
Looks like it's matrix, menu questions with Other (Describe) options - these create a duplicate row for each subquestion_id. Might be happening in those nested for-loops but they are hard for me to read and debug. I could fix at the end for now but that seems more patchy.
df %>%
filter(!is.na(subquestion_id)) %>%
group_by(subquestion_id) %>%
filter(n() > 1) %>%
filter(sum(is.na(answerchoice_id)) > 0)
I've filtered out the seemingly problematic rows above, but a separate issue is that the open-ended responses are coming in with a blank subquestion_id
. For reference, respondent 6140321370, question_id 97570255.
It creates pairs of rows where one has answerchoice_text = NA, the next has answerchoice_text = "Other (Describe)"
For my own debugging purposes, one case is question_id 97570255.