panel.cor: Correlation panel for 'pairs'.

panel.corR Documentation

Correlation panel for pairs.

Description

This is a function that can be passed to pairs to visually depict the correlation coefficient and its significancy.

Usage

panel.cor(x, y, digits = 2, 
    prefix = "", cex.cor = NULL, 
    method = c("pearson", 
        "spearman", "spearmanExact", 
        "lm", "glmPoisson"), 
    n.adjust = 1, col.coef = "black", 
    col.signif = "red", 
    dbg = 0, ...)

Arguments

x

x data

y

y data

digits

number of significant digits in the reported correlation coefficients

prefix

prefix to be shown in front of correlation coefficients

cex.cor

magnification for the correlation coefficients and its significance (if NULL, is computed automatically and scaled proportionally to the significance)

method
n.adjust

number of tests to adjust P-values to

col.coef

color of coefficient

col.signif

color of significance flags

dbg

debug level

...

other arguments (ignored currently)

Author(s)

Tomas Sieger

Examples

pairs(iris,
  upper.panel = function(x,y,..) panel.cor(x, y, n.adjust = ncol(iris) * (ncol(iris) - 1) / 2),
  lower.panel = points)

tsieger/tsiMisc documentation built on Oct. 10, 2023, 10:24 p.m.