Separate a String using Tidyr's “separate” into Multiple Columns and then Create a New Column with Counts
问题 So I have the basic dataframe below which contains long strings separated by a comma.I used Tidyr's "separate" to create new columns. How do I add another new column with counts of how many new columns there are for each person that contain an answer? (no NA's). I suppose the columns can be counted after being separated, or before, by counting how many string elements there are that are separated by a comma? Any help would be appreciated. I would like to stay within the Tidyverse and dplyr.