correlogram: Correlogram

Description Usage Arguments Value Examples

View source: R/correlogram.R

Description

R function that creates a correlation matrix or correlogram with all the numerical variables included in the dataset provided. As an addition to the plot, the function also performs all possible pairwise linear regressions between variables giving the results in an excel table.

Usage

1
2
3
correlogram(data,method,upper.col,lower.col,signif.col,sig.level,
            regression.line, regression.line.col,main,
            save,height,width,path.output,filename,date,regression.table)

Arguments

data

Data set only with numerical variables and without missings.

method

a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated.

upper.col

Upper circles color palette

lower.col

Lower dotplot color

signif.col

significance stars color

sig.level

significance level. default:0.05

regression.line

logical. Dot plot with linear regression

regression.line.col

regression line color

main

Chart title

save

logical. Save the correlogram in pdf

height

pdf parameter

width

pdf parameter

path.output

path

filename

pdf file name

date

include the current date in the filename?

regression.table

logical. Save regression.table in an excel (only when save is TRUE)

Value

A correlogram plot.

When specified, a regression table with all possible pairwise linear regressions is created and saved in excel. The output has 7 columns: yvar, xvar, alpha, beta, R2, Pval and Pval.sign.

Examples

1
2
3
data(iris)

correlogram(iris[,-5],method='pearson')

douve/viRievac documentation built on Nov. 26, 2020, 2:39 a.m.