Does this work:
library(dplyr) library(tidyr) df %>% separate_rows(category, sep = ',') %>% count(category, name = 'frequency') # A tibble: 3 x 2 category frequency <chr> <int> 1 A 3 2 B 3 3 C 2
548k questions
547k answers
4 comments
86.3k users