Learn R Programming

CrossExpression (version 1.0.0)

correlation: Computes Pearson's correlation between pairs of columns. If one matrix is provided, the output is the pairwise correlations between its columns. If two matrices are provided, the output is the pairwise correlations between their columns.

Description

Computes Pearson's correlation between pairs of columns. If one matrix is provided, the output is the pairwise correlations between its columns. If two matrices are provided, the output is the pairwise correlations between their columns.

Usage

correlation(matrix1, matrix2 = NULL)

Value

Returns a correlation matrix.

Arguments

matrix1

The first input matrix.

matrix2

The second input matrix (optional).