I've got this data:
table(main$Sex1,main$District)
Bahawalnagar Barkhan Chiniot Faisalabad Ghotki
Female 37 16 26 97 46
Male 25 19 15 20 25
I can plot it with base R
barplot(table(main$Sex1,main$District))
So my question is, how can I do this with ggplot2? Thanks
wide. Can you provide adputfrommain?tableclass is already long, it just prints in a special way. If you pass it withas.data.frameit will be long.