Plot many categories
问题 I've data as follow, each experiment lead to the apparition of a composition, and each composition belong to one or many categories. I want to plot occurence number of each composition: DF <- read.table(text = " Comp Category Comp1 1 Comp2 1 Comp3 4,2 Comp4 1,3 Comp1 1,2 Comp3 3 ", header = TRUE) barplot(table(DF$Comp)) So this worked perfectly for me. After that, as composition belong to one or many categories. there's comma separations between categories.I Want to barplot the compo in X and