powered by
Compute the Distance between samples in a Spectra object. This is a means to quantify the similarity between samples. A heat map style plot is an option.
sampleDistSpectra(spectra, method = "pearson", plot = TRUE, ...)
An object of S3 class Spectra.
Spectra
Character. A string giving the distance method. See rowDist for options.
rowDist
Logical. Shall a level plot be made?
Arguments to be passed to the plotting function.
A numeric matrix giving the correlation coefficients.
https://github.com/bryanhanson/ChemoSpec
The sample distances can be used to cluster the samples. See for example hcaSpectra.
hcaSpectra
# NOT RUN { require("lattice") data(SrE.IR) M <- sampleDistSpectra(SrE.IR, method = "cosine", main = "SrE.IR Spectral Angle Between Samples") # }
Run the code above in your browser using DataLab