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.
Details
The data.frame has 6 columns:
- 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_classfor easy grouping- group
whether the median is within or between groups of samples