powered by
add_col_clustering
# S4 method for Iheatmap add_col_clustering( p, method = c("hclust", "kmeans", "groups"), name = "ColClusters", k = NULL, groups = NULL, clust_dist = stats::dist, colors = NULL, show_colorbar = TRUE, side = c("top", "bottom"), yname = NULL, xname = current_xaxis(p) )
Iheatmap-class object, which can be printed to generate an interactive graphic
Iheatmap-class
iheatmap object
"hclust" or "kmeans" for hierarchical or k-means clustering, respectively
name of colorbar indicating cluster membership
number of clusters for rows, needed if order is kmeans or optional if hclust
vector of group assignments
distance function to use for clustering if hierarchical clustering
colors to use for annotation of grouping, can be RColorBrewer palette name or vector of colors
show the colorbar for the heatmap indicating cluster membership
side of plot on which to add subplot
name of yaxis
name of xaxis
Alicia Schep
add_row_clustering, iheatmap
add_row_clustering
iheatmap
mat <- matrix(rnorm(20), ncol = 5, nrow = 4) hm <- iheatmap(mat) %>% add_col_clustering(method = "hclust", k = 2) # Print heatmap if interactive session if (interactive()) hm
Run the code above in your browser using DataLab