View source: R/correlation_plot.R
mu_heatmap | R Documentation |
given a matrix denoting either distance or similarity, create a heatmap.
mu_heatmap(
matrix_data,
title = "",
groups = NULL,
transform = "none",
min_value = 0,
...
)
matrix_data |
matrix of binary distances |
title |
the title of the data |
groups |
data.frame of groups (default = NULL) |
transform |
how to transform the data for similarity reordering |
min_value |
the minimum value to use (default = 0) |
... |
other parameters for ComplexHeatmap |
## Not run:
library(metabolomicsUtilities)
set.seed(1234)
mat <- matrix(rnorm(100, 2, sd = 0.5), 10, 10)
rownames(mat) <- colnames(mat) <- letters[1:10]
sample_class <- data.frame(grp = rep(c("grp1", "grp2"), each = 5), stringsAsFactors = FALSE)
rownames(sample_class) <- rownames(mat)
mu_heatmap(mat, groups = sample_class[, "grp", drop = FALSE])
# if there is a class with only one member, it is dropped, with a warning
sample_class[10, "grp"] = "grp3"
mu_heatmap(mat, groups = sample_class[, "grp", drop = FALSE])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.