Learn R Programming

ChemoSpec (version 4.2.8)

hcaScores: HCA on PCA scores from a Spectra Object

Description

A wrapper which performs HCA on the scores from a PCA of a Spectra object, color-coding the results as specified in the object. Many methods for computing the clusters and distances are available.

Usage

hcaScores(spectra, pca, scores = c(1:5), c.method = "complete",
	d.method = "euclidean", use.sym = FALSE,
        leg.loc = "topright", ...)

Arguments

Value

A list, containing an object of class hclust and an object of class dendrogram. The side effect is a plot.

Rdversion

1.1

References

https://github.com/bryanhanson/ChemoSpec

See Also

hclust for the underlying function. See hcaSpectra for HCA of the entire data set stored in the Spectra object. plotHCA for the function that actually does the plotting.

Examples

Run this code
data(SrE.IR)
results <- c_pcaSpectra(SrE.IR, choice = "noscale")
myt <- expression(bolditalic(Serenoa)~bolditalic(repens)~bold(IR~Spectra))
res <- hcaScores(SrE.IR,  results, scores = c(1:5), main = myt)

Run the code above in your browser using DataLab