pairs.panels: SPLOM, histograms and correlations for a data matrix
Description
Adapted from the help page for pairs, pairs.panels shows a scatter plot of matrices (SPLOM), with bivariate scatter plots below the diagonal, histograms on the diagonal, and the Pearson correlation above the diagonal. Useful for descriptive statistics of small data sets.Usage
pairs.panels(x, y, smooth = TRUE, scale = FALSE, digits = 2, ...)
Arguments
y
an optional data.frame or matrix
smooth
TRUE draws loess smooths
scale
TRUE scales the correlation font by the size of the absolute correlation.
digits
the number of digits to show
...
other options for pairs
Value
- a scatter plot matrix (SPLOM) is drawn in the graphic window. The lower off diagonal draws scatter plots, the diagonal histograms, the upper off diagonal reports the Pearson correlation (with pairwise deletion).
Details
Shamelessly adapted from the pairs help page. Uses panel.cor, panel.cor.scale, and panel.hist, all taken from the help pages for pairs.Examples
Run this code#pairs.panels(attitude) #see the graphics window
Run the code above in your browser using DataLab