matCorr: Calculate a correlation matrix.

View source: R/matCorr.R

matCorrR Documentation

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)

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.

Value

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


andymckenzie/DGCA documentation built on Sept. 15, 2023, 5:04 a.m.