This function takes one or two input matrices and calculates a correlation matrix from it using the speed-optimized correlation function from WGCNA.
matCorr(matA, corrType, use = "pairwise.complete.obs", matB = NULL,
secondMat = FALSE)
A correlation matrix. data(darmanis); darmanis_subset = darmanis[1:30, ] matcor_res = matCorr(matA = darmanis_subset, corrType = "pearson")
Input data matrix with numeric entries.
The type of correlation to be performed. Either "pearson" or "spearman".
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).
Optional input data matrix with which the comparison with matA will be made.
Logical indicator of whether there is a second matrix in the comparison or not.