| sampleDistSpectra {ChemoSpec} | R Documentation |
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, ...)
spectra |
An object of S3 class |
method |
Character. A string giving the distance method. See
|
plot |
Logical. Shall a level plot be made? |
... |
Arguments to be passed to the plotting function. |
A numeric matrix giving the correlation coefficients.
Bryan A. Hanson, DePauw University.
https://github.com/bryanhanson/ChemoSpec
The sample distances can be used to cluster the samples. See for
example hcaSpectra.
require("lattice")
data(SrE.IR)
M <- sampleDistSpectra(SrE.IR, method = "cosine",
main = "SrE.IR Spectral Angle Between Samples")