6.2 Correlation Heatmaps

When the heatmap_type argument is (an abbreviation of) "sample_correlation" or "feature_correlation", complex_heatmap constructs the matrix of correlations (default cor_method = "pearson") between samples or features and generates a heatmap. Correlation heatmaps become even more useful when annotated (Section 6.3).

6.2.1 Sample Correlation

# Sample correlation heatmap
complex_heatmap(m, heatmap_type = "sample")

6.2.2 Feature Correlation

# Feature correlation heatmap
complex_heatmap(m, heatmap_type = "feature")