Is it possible to split a string and then use the split to create new variables?
For example, data is "Red", "Blue", "Red Blue", "Red Blue Green"
I would like to capture those who selected "Red", "Blue", "Green" in a matching "True/False" variable AND create a (selected more than one) "Multicolor" variable.
I have used
str_split(data$race, "\n", n=3)
which shows me the splits but I need help with creating the variables from the splits.