Scatter plot matrices are useful compact displays of all pairwise scatter plots among a (small) group of variables. They can be produced in R using the pairs() function. (They can also be produced with the plots() function, but we illustrate that technique in another video dedicated to the plot() function.) We illustrate the pairs() function, and we also show how to use a method suggested in the pairs() help page to replace the diagonal panels with histograms and the upper (or lower) triangle panels of the scatter plot matrix with printed correlation coefficients.
Conditioning plots, or coplots, are useful for examining the relationship between two variables conditional upon the levels of a third or of a third and fourth variable. These plots are implements in base R graphics in the coplot() function, which creates a paneled plot. We illustrate the use of this function to create scatter plots of two body measurements (shoulder girth and waist girth) conditional upon sex and upon sex and (categorized) age.
We also demonstrate how to save a plot produced in R or RStudio by writing the plot to a postscript graphics device, which creates a postscript file. Other devices exist that can be used in a similar manner to store the plot in a different file format. See the help page for Devices (type "?Devices" at the R console) for details. Graphics can also be copied and pasted from the RStudio graphics device, or saved to files of various formats from that device, via the menus.
The examples from this video are in Mod12Script.R and you should open this script in RStudio and follow along by reading and running the relevant code.
Scatter plot matrices are helpful tools that are worth using often for exploratory data analysis. And the enhancement to the standard scatter plot matrix covered in this video is worth learning. Coplots are useful tools, but not at the top of the list of important graphical procedures to know and use regularly. Nevertheless, I encourage you to watch this video, both for the introduction to scatter plot matrices and coplots, but also for the illustration of how to use a graphics device that stores a plot in a file that can be used later, outside of R/RStudio (e.g., to be included in a document).