In This Chapter
Installing and loading the ggplot2 package
Understanding how to use build a plot using layers
Creating charts with suitable geoms and stats
Adding facets to your plot
One of the strengths of R is that it’s more than just a programming language — it also has thousands of packages written and contributed by independent developers. One of these packages, ggplot2, is tremendously popular and offers a new way of creating insightful graphics using R.
In this chapter, you first install and load the ggplot2 package and then take a first look at layers, the building blocks of the ggplot2 graphics. Next, you define the data, geoms, and stats ...