getcor: Get correlation matrix

Description Usage Arguments Value Author(s) Examples

View source: R/EPIBLASTER.R

Description

Fast calculation of correlation matrix on CPU (the idea is from WGCNA fast function for pearson correlations)

Usage

1
getcor(A = NULL, B = NULL, method = "pearson", ...)

Arguments

A

is a matrix or data.frame.

B

is a matrix or data.frame.

method

a character string indicating which correlation coefficient is to be computed. Current version only supports "pearson" correlation.

...

not used.

Value

correlation matrix

Author(s)

Beibei Jiang beibei_jiang@psych.mpg.de

Examples

1
2
3
4
set.seed(123)
A <- matrix(rnorm(100, mean = 5, sd = 10), ncol = 10)
B <- matrix(rnorm(200, mean = 10, sd = 100), ncol = 20)
C <- getcor(A, B)

episcan documentation built on May 2, 2019, 9:42 a.m.