Description Usage Arguments Value Examples
View source: R/hs_hclust_cutoff.R
An easy exploratory way to draw clusters at a given height on a dendrogram.
1 | hs_hclust_cutoff(dend, h = 0.75, bordercol = "red", ...)
|
dend |
a hclust object |
h |
cutoff distance for the clusters to be plotted (defaults to 0.75) |
bordercol |
the color of the border |
... |
other parameters passed on to plot.hclust |
a matrix with the assigned clusters for each leaf (in the case of Raman data each cell)
1 2 3 4 5 6 7 8 9 10 11 12 | # Load hyperSpec object
data("hs_example")
# Convert to MassSpectrum object
hs.x.proc <- hs_preprocess(hs_example)
# cluster cells
hclust_obj <- hs_hclust(hs.x.proc, dist_method = "bray",
clust_method = "hclust")
# Draw cutoff
hs_hclust_cutoff(hclust_obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.