pair_cor: Compute correlations between each matching row or column of...

View source: R/util.R

pair_corR Documentation

Compute correlations between each matching row or column of two matrices

Description

e.g. row 1 of mat1 will be correlated with row 1 of mat2; row 2 of mat 1 with row 2 of mat2, etc.

Usage

pair_cor(mat1, mat2, margin = 1)

Arguments

mat1

a numeric matrix for correlation

mat2

a second numeric matrix for correlation

margin

1 for rows, 2 for columns (as for the MARGIN parameter of apply())

Details

The matrices must have the same number of rows or columns

Value

a numeric vector with paired correlation values


AllenInstitute/scrattch.hicat documentation built on Oct. 20, 2023, 6:55 a.m.