Description Usage Arguments Value Examples
View source: R/plot_matrix_heatmap.R
Draws a clustered heatmap using clustering methods implemented in the popular R package pheatmap. Returns a ggplot2 object
1 2 3 4 5 6 7 | plot_matrix_heatmap(matrix, scale = "row", limits = NULL,
color_scale_type = "diverge", color_scale = c("blue", "lightyellow",
"red"), scale_midpoint = 0, cluster_rows = T, cluster_cols = T,
clustering_distance_rows = "euclidean",
clustering_method_rows = "complete",
clustering_distance_cols = "euclidean",
clustering_method_cols = "complete", square_tiles = F)
|
matrix |
a matrix of values |
scale |
"rows" or "cols" or "none"; indicates whether values should be centered and scaled in the row direction or the column direction or none. |
limits |
minimum and maximum values to define the range of the color scale |
color_scale_type |
"diverge", "seq" or "rescale". |
color_scale |
vector of colors to use for color scale; different options for color_scale_type requires different number of colors - "diverge" (3 colors), "seq" (2 colors), "rescale" (3 colors) |
scale_midpoint |
numeric; value of midpoint for "diverge" and "rescale" color scales |
cluster_rows |
logical; if rows should be clustered |
cluster_cols |
logical; if columns should be clustered |
clustering_distance_rows |
distance measure used in clustering rows. Possible values are "correlation", "euclidean", "maximum", "manhattan", "canberra", "binary", or "minkowski" (defined in dist() function.) |
clustering_method_rows |
clustering method used for rows. Accepts the same values as hclust: "ward.D", "ward.D2", "single", "complete", "average" (=UPGMA), "mcquitty" (=WPGMA), "median" (=WPGMC) or "centroid" (=UPGMC). |
clustering_distance_cols |
distance measure used in clustering columns. Possible values are the same as clustering_distance_rows. |
clustering_method_cols |
clustering method used for columns. Accepts the same values as clustering_method_rows. |
square_tiles |
logical; if tiles should be made square |
a ggplot2 object
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.