Learn R Programming

episcan (version 0.0.1)

getcor: Get correlation matrix

Description

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

Usage

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab