Initial data inspection using plots is even more important when there are many variables, any one of which might contain mistakes or omissions. The principal plot functions when there are multiple variables are:
We illustrate these functions with the ozone data.
With two or more continuous explanatory variables (i.e. in a multiple regression; see p. 433) it is valuable to be able to check for subtle dependencies between the explanatory variables. The pairs function plots every variable in the dataframe on the y axis against every other variable on the x axis: you will see at once what this means from the following example:
ozonedata<-read.table("c:\\temp\\ozone.data.txt",header=T) attach(ozonedata) names(ozonedata)  "rad" "temp" "wind" "ozone"
The pairs function needs only the name of the whole dataframe as its first argument. We exercise the option to add a non-parametric smoother to the scatterplots:
The response variables are named in the rows and the explanatory variables are named in the columns. In the upper row, labelled rad, the response variable (on the y axis) is solar radiation. ...