get_correlation_list: Calculate correlation within each group.

View source: R/build_module.R

get_correlation_listR Documentation

Calculate correlation within each group.

Description

Calculate Pearson correlation coefficient within each group.

Usage

get_correlation_list(x, group_labels)

Arguments

x

A n by p matrix.

group_labels

A vector of length n, indicating the group of rows.

Value

An array of Pearson correlation coefficient for each row, rows belong to the same group have same values.

Examples

get_correlation_list(x = matrix(rnorm(5*10),5,10), group_labels = c(rep(1,2),rep(2,3)))

chrischen1/GNET2 documentation built on June 29, 2022, 8:53 a.m.