sampleDistSpectra {ChemoSpec}R Documentation

Compute the Distance Between Samples in a Spectra Object

Description

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.

Usage

sampleDistSpectra(spectra, method = "pearson", plot = TRUE, ...)

Arguments

spectra

An object of S3 class Spectra.

method

Character. A string giving the distance method. See rowDist for options.

plot

Logical. Shall a level plot be made?

...

Arguments to be passed to the plotting function.

Value

A numeric matrix giving the correlation coefficients.

Author(s)

Bryan A. Hanson, DePauw University.

References

https://github.com/bryanhanson/ChemoSpec

See Also

The sample distances can be used to cluster the samples. See for example hcaSpectra.

Examples


require("lattice")
data(SrE.IR)
M <- sampleDistSpectra(SrE.IR, method = "cosine",
  main = "SrE.IR Spectral Angle Between Samples")


[Package ChemoSpec version 4.4.97 Index]