median_correlations: calculate median correlations

View source: R/correlations.R

median_correlationsR Documentation

calculate median correlations

Description

Given a correlation matrix and optionally the sample class information, calculates the median correlations of each sample to all other samples in the same class. May be useful for determining outliers.

Usage

median_correlations(cor_matrix, sample_classes = NULL, between_classes = FALSE)

Arguments

cor_matrix

the sample - sample correlations

sample_classes

the sample classes as a character or factor

between_classes

should the between class correlations be evaluated?

Details

The data.frame may have 5 columns, first three are always present, the second two come up if between_classes = TRUE:

med_cor

the median correlation with other samples

sample_id

the sample id, either the rowname or an index

sample_class

the class of the sample. If not provided, set to "C1"

compare_class

the class of the other sample

plot_class

sample_class::compare_class for easy grouping

Value

data.frame


rmflight/visualizationQualityControl documentation built on Feb. 18, 2024, 9:46 a.m.