Before even embarking on any numerical analyses, you may want to get a good idea about the data through a few quick plots. The base R system supports basic graphics, so for more advanced plots requirement, we generally use lattice and ggplot packages. In this recipe we will cover the simplest form of basic graphs.
Generating standard plots, such as histograms, boxplots, and scatterplots
Getting ready
If you have not already done so, download the data files for this chapter and ensure that they are available in your R environment's working directory, and run the following commands:
> auto <- read.csv("auto-mpg.csv")
>
> auto$cylinders <- factor(auto$cylinders, levels = c(3,4,5,6,8), labels...