corrTable: Get correlation table for numerical matrix M.

Description Usage Arguments Details Value Author(s)

Description

Wrapper around rcorr

Usage

1
corrTable(M, type = "pearson", file = "", diag = FALSE)

Arguments

M

A numeric matrix with at least 2 columns.

type

Passed to rcorr.

file

A string. If not empty, then save the matrix to file with the given name.

diag

Values to put in diagonal of corrTable: NA (default), standard deviation, variance

Details

This is wrapper around rcorr that aims to return a reasonably formatted table of correlations. R values are in the lower triangle with NAs elsewhere. Diagonal is NA by default, but may be set to standard deviations or variances.

TODO: put means or SDs on the diagonal; put Ns or pvals in the upper.tri

Value

A matrix with R values in the lower triangle and NAs elsewhere

Author(s)

Dave Braze davebraze@gmail.com


davebraze/FDB1 documentation built on May 14, 2019, 8:59 p.m.