My data frame is similar to this
df<-read.table (text=" Gender Fruit Food
Male Pear Yes
Female Pear Yes
Male Grape Yes
Female Apple No
Male Grape No
Male Pear No
Male Guba Yes
Male Grape No
Female Apple No
Female Pear Yes
Female Apple Yes
Male Guba No
Female Guba No
Male Pear Yes
Male Apple Yes
Male Pear No
Female Pear Yes
Male Guba No
", header=TRUE)
I want to get a barplot like this along with a table under this plot to show numbers:
In plot G, A, G, P should read Grape, Apple, Guba and Pear
It would be good if we could have a table under this plot to see the values. This has been done in Excel simply.