Description Usage Arguments Value Author(s) References See Also Examples
Enhanced scatterplot matrices with univariate displays down the diagonal;
spm
is an abbreviation for scatterplotMatrix
.
This function just sets up a call to pairs
with custom panel functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | scatterplotMatrix(x, ...)
## S3 method for class 'formula'
scatterplotMatrix(formula, data=NULL, subset, id=FALSE, ...)
## Default S3 method:
scatterplotMatrix(x, smooth=TRUE, id=FALSE, legend=TRUE,
var.labels=colnames(x),
diagonal=c("density", "boxplot", "histogram", "oned", "qqplot", "none"),
adjust=1, nclass, plot.points=TRUE, spread = !by.groups, reg.line=lm,
transform=FALSE, family=c("bcPower", "yjPower"), ellipse=FALSE,
groups=NULL, by.groups=FALSE, use=c("complete.obs", "pairwise.complete.obs"),
col=if (n.groups == 1) palette()[3:1] else rep(palette(), length=n.groups),
pch=1:n.groups, lwd=1, lty=1,
cex=par("cex"), cex.axis=par("cex.axis"), cex.labels=NULL,
cex.main=par("cex.main"), row1attop=TRUE, ...)
spm(x, ...)
|
x |
a data matrix, numeric data frame. |
formula |
a one-sided “model” formula, of the form
|
data |
for |
subset |
expression defining a subset of observations. |
smooth |
specifies the smoother to be used along with its arguments; if |
id |
controls point identification; if |
legend |
controls placement of a legend if the plot is drawn by groups; if |
var.labels |
variable labels (for the diagonal of the plot). |
diagonal |
contents of the diagonal panels of the plot. If plotting by groups, a different
univariate display (with the exception of |
adjust |
relative bandwidth for density estimate, passed to
|
nclass |
number of bins for histogram, passed to |
plot.points |
if |
spread |
if TRUE, estimate the (square root) of the variance function. For |
reg.line |
if not |
transform |
if |
family |
family of transformations to estimate: |
ellipse |
controls plotting data-concentration ellipses. If |
groups |
a factor or other variable dividing the data into groups; groups are plotted with different colors and plotting characters. |
by.groups |
if |
use |
if |
pch |
plotting characters for points; default is the plotting characters in
order (see |
col |
colors for lines and points; the default is taken from the color palette,
with |
lwd |
width of linear-regression lines (default |
lty |
type of linear-regression lines (default |
cex, cex.axis, cex.labels, cex.main |
set sizes of various graphical elements
(see |
row1attop |
If |
... |
arguments to pass down. |
NULL
. This function is used for its side effect: producing
a plot.
John Fox jfox@mcmaster.ca
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
pairs
, scatterplot
,
dataEllipse
, powerTransform
,
bcPower
, yjPower
, cov.trob
,
showLabels
, ScatterplotSmoothers
.
1 2 3 4 5 | scatterplotMatrix(~ income + education + prestige | type, data=Duncan)
scatterplotMatrix(~ income + education + prestige,
transform=TRUE, data=Duncan, id=TRUE, smooth=list(smoother=gamLine))
scatterplotMatrix(~ income + education + prestige | type, smooth=FALSE,
by.group=TRUE, transform=TRUE, ellipse=TRUE, data=Duncan)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.