powered by
Add row groups and order rows based on groups
# S4 method for Iheatmap add_row_clusters( p, clusters, name = "RowClusters", reorder = TRUE, side = c("left", "right"), yname = current_yaxis(p), ... )
Iheatmap-class object, which can be printed to generate an interactive graphic
Iheatmap-class
iheatmap object
cluster assignments, should be vector of integers, characters, or factors
name of colorbar indicating cluster membership
reorder rows based on clusters? default is TRUE
side of plot on which to add subplot
name of yaxis
additional arguments to pass to add_row_groups for creation of annotation heatmap indicating cluster membership
add_row_groups
Alicia Schep
This function is very similar to add_row_groups; the main difference is that with this function rows will get reordered based on the groups.
add_row_clustering, add_col_clusters, iheatmap
add_row_clustering
add_col_clusters
iheatmap
mat <- matrix(rnorm(20), ncol = 5, nrow = 4) clusters <- c("A","B","A","B") hm <- iheatmap(mat) %>% add_row_clusters(clusters) # Print heatmap if interactive session if (interactive()) hm
Run the code above in your browser using DataLab