Chapter 2. Advanced Functions in Base Graphics
The goal of this chapter is to enable you to create different types of graphs in R. In Chapter 1, Base Graphics in R – One Step at a Time, you created scatterplots and line plots. Now in this chapter, you will learn how to create other types of graphs, including bar charts, histograms, boxplots, pie charts, and dotcharts. Topics covered in this chapter include the following:
- Including a regression line and residuals in your graph
- Creating complex multiple axes
- Including grid lines and point labels
- Shading and coloring your graph
- Creating bar charts, histograms, boxplots, pie charts, and dotcharts
- Adding LOWESS smoothers to your graph
- Creating scatterplot matrices
- Adding error bars
After working through this chapter, you should understand the principles behind certain advanced plotting functions and should be able to create a wide range of graphs for research and analysis.