hs_hclust_cutoff: Plot clusters on hclust object at given height.

Description Usage Arguments Value Examples

View source: R/hs_hclust_cutoff.R

Description

An easy exploratory way to draw clusters at a given height on a dendrogram.

Usage

1
hs_hclust_cutoff(dend, h = 0.75, bordercol = "red", ...)

Arguments

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

Value

a matrix with the assigned clusters for each leaf (in the case of Raman data each cell)

Examples

 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)

CMET-UGent/MicroRaman documentation built on July 25, 2020, 6:20 p.m.