Learn R Programming

DGCA (version 1.0.3)

matCorr: Calculate a correlation matrix.

Description

This function takes one or two input matrices and calculates a correlation matrix from it using the speed-optimized correlation function from WGCNA.

Usage

matCorr(matA, corrType, use = "pairwise.complete.obs", matB = NULL,
  secondMat = FALSE)

Value

A correlation matrix. data(darmanis); darmanis_subset = darmanis[1:30, ] matcor_res = matCorr(matA = darmanis_subset, corrType = "pearson")

Arguments

matA

Input data matrix with numeric entries.

corrType

The type of correlation to be performed. Either "pearson" or "spearman".

use

The "use" method for performing the correlation calculation. See ?cor for more information. Default = "pairwise.complete.obs" (which is one of the speed-optimized versions; see ?WGCNA::cor for more).

matB

Optional input data matrix with which the comparison with matA will be made.

secondMat

Logical indicator of whether there is a second matrix in the comparison or not.