# creating multiple bar plots in R
# creating a dummy data frame
barplot1=c(10,2,5,4,6,5,8,10,5,9)
barplot2=c(9,5,6,4,7,1,2,6,2,6)
barplot3=c(4,2,9,4,3,5,7,10,10,3)
data <- data.frame(barplot1,barplot2,barplot3)
# plotting multiple bar plots
barplot(as.matrix(data),
main="Multiple Bar Plots",
# setting y label only
# because x-label will be our
# barplots name
ylab="Count",
# to plot the bars vertically
beside=TRUE,
)