View source: R/pairs.panel.functions.R
panel.cor.res | R Documentation |
The functions here can be used to customize upper and lower triangles in
correlation matrices. In particular panel.cor.res
provides correlation
coefficients (any alternative from cor
can be used) and p-values for correlation
tests. The function panel.lm
puts linear fitted lines from simple linear
regression in scatterplots. Note that the function panel.smooth
provides a
smoother fit.
panel.cor.res(x, y, digits = 2, meth = "pearson", cex.cor=1)
panel.lm(x, y, col = par("col"), bg = NA, pch = par("pch"), cex = 1,
col.line = 2,lty = par("lty"))
x |
variable 1 in correlation |
y |
variable 2 in correlation |
digits |
number of digits in text for |
meth |
type of correlation coefficient from |
cex.cor |
size of text in |
col |
color of points in |
bg |
background color of points in |
pch |
type of symbols for points in |
cex |
symbol size in |
lty |
line type in |
col.line |
color of lines in |
Ken Aho
cor
, cor.test
, panel.smooth
data(asthma)
pairs(asthma, cex.labels=1, cex=.95, gap=.1, lower.panel = panel.cor.res,
upper.panel = panel.lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.