Skip to content

Access results from randomized surveys #579

Closed Answered by rubenarslan
psycaroly asked this question in Q&A
Discussion options

You must be logged in to vote

So, if you use debug mode, you can download the attached Rmd file in the last step, where the error occurs.
Then, you can open the code on your local computer and go through it line-by-line.
If you do that, you see that the problem is that surveyA1$reflection1 isn't NA — it's NULL/it doesn't exist.
So, heading1 <- ifelse(!is.null(survey_A1$reflection1), "Gemeinsamkeiten", ifelse(!is.null(survey_A2$reflection1), "Unterschieden", "Eigenschaften")) works.
If you don't want to write that much (quickly becomes confusing), how about dplyr::coalesce(survey_A1$reflection1, survey_A2$reflection1, survey_A3$reflection1).

But yes, you could also refer to the shuffle$group variable in the ifelse cond…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by psycaroly
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants