cor.pairs: Fast pairwise correlation estimation

Description Usage Arguments Value Examples

View source: R/inference_methods.R

Description

Fast estimation of pairwise correlation coefficients.

Usage

1
cor.pairs(emat, cor.method = c("pearson", "spearman"))

Arguments

emat

a numeric matrix

cor.method

a character, specifying the method to use for estimation. Possible values are 'pearson' (default) and 'spearman'

Value

a numeric matrix with estimated correlation coefficients

Examples

1
2
3
x <- matrix(rnorm(200), 100, 2)
cor.pairs(x)
cor.pairs(x, cor.method = 'spearman')

Example output

            [,1]        [,2]
[1,]  1.00000000 -0.04835608
[2,] -0.04835608  1.00000000
            [,1]        [,2]
[1,]  1.00000000 -0.04879688
[2,] -0.04879688  1.00000000

dcanr documentation built on Nov. 8, 2020, 5:48 p.m.