hmDendrogram | R Documentation |
Set and adjust the dendrograms for a d3heatmap object
hmDendrogram(
d3heatmap,
dendrogram = c("row", "column", "both", "none"),
reorder,
row.reorder,
column.reorder,
distance.function,
clustering.function,
reorder.function,
groups,
symmetrical
)
d3heatmap |
Required A valid d3heatmap object |
dendrogram |
Required The dendrogram to process in this
call, among |
reorder |
a parameter that allows the user to pass in a single
reordering value to use on the dendrograms specified in the
|
row.reorder |
determines if and how the row dendrogram should be reordered. By default, it is TRUE, which implies dendrogram is computed and reordered based on row means. If NULL or FALSE, then no dendrogram is computed and no reordering is done. If a dendrogram, then it is used "as-is", i.e., without any reordering. If a vector of integers, then dendrogram is computed and reordered based on the order of the vector. |
column.reorder |
determines if and how the column dendrogram should be be reordered. Has the options as the Rowv argument above and additionally when x is a square matrix, Colv = "Rowv" means that columns should be treated identically to the rows. |
distance.function |
function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist. |
clustering.function |
function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust. |
reorder.function |
function(d, w) of dendrogram and weights for reordering the row and column dendrograms. |
groups |
an integer scalar with the desired number of groups by which to color the dendrogram's branches (uses color_branches) |
symmetrical |
logical indicating if x should be treated symmetrically; can only be true when x is a square matrix. |
Modified d3heatmap object
The interface was inspired by dygraphs
heatmap, heatmap.2
## Not run:
d3heatmap(mtcars, scale = "column", col = "Blues") %>%
hmDendrogram(dendrogram = 'row', groups = 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.