Suppose I have the following data:
Fruit <- c(rep(\"Apple\",3),rep(\"Orange\",5)) Bug <- c(\"worm\",\"spider\",\"spider\",\"worm\",\"worm\",\"worm\",\"
Fruit <- c(rep("Apple",3),rep("Orange",5)) Bug <- c("worm","spider","spider","worm","worm","worm","worm","spider") df <- data.frame(Fruit,Bug) ggplot(df, aes(Fruit, ..count..)) + geom_bar(aes(fill = Bug), position = "dodge")