Bar Charts

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

The bar geom counts the number of instances of each class so that you don’t need to tabulate your values beforehand

# load the ggplot2 library

# set the seed so we can reproduce the results
# plot the color
qplot(color, data = diamonds, geom = "bar")