survey <- data.frame(fruit=c("Apple", "Banana", "Grapes", "Kiwi", "Orange", "Pears"),
                     people=c(40, 50, 30, 15, 35, 20))
install.packages("ggplot2")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.1'
## (as 'lib' is unspecified)
library(ggplot2)
ggplot(survey, aes(x=fruit, y=people)) +
         geom_bar(stat="identity")

ggplot(survey, aes(x=fruit, y=people, fill=fruit)) + 
       geom_bar(stat="identity")