# Bar Graph

Want to learn more? I recommend working through: R for Data Science, R Cookbook, and R Graphics Cookbook.

# load the ggplot2 library library(ggplot2)

# plot BOD$Time and BOD$demand qplot(BOD$Time, BOD$demand, geom="bar", stat="identity")

# Convert the x variable to a factor, so that it is treated as discrete qplot(factor(BOD$Time), BOD$demand, geom="bar", stat="identity")