I am trying to prepare survey data for analysis. I have a question with "check all that apply" answers which are sitting in a single column in my data frame with the responses comma separated, ex. below:
This is what I want it to look like:
|col1|col2|col3 = Happy|col4 = Sad|col5 = Mad|
I have found multiple postings and guidance on subsetting and separating the comma separated values but not on how to pivot the options to be the name of the columns and assign the 1 or 0 based on whether that selection was made by the respondent. Would love pointers. Thank you in advance!