Learn R Programming

ChemoSpec (version 3.0-1)

hmapSpectra: Create a Seriated Heat Map Comparing Samples and Spectral Data for a Spectra Object

Description

Creates a heat map with marginal dendrograms using seriation procedures. Very briefly, the samples that are most like each other occur in one corner, and the frequencies that are most informative with respect to the samples are in that corner as well. This is achieved by using hierchical cluster analysis and then re-ordering the clusters in a coordinated way across each dimension. See the reference.

Usage

hmapSpectra(spectra, no.col = 5, cexRow = 1, cexCol = 1, ...)

Arguments

spectra
An object of S3 class "Spectra"
no.col
The number of colors (levels) to use in the heat map. Maximum of 9, generated by RColorBrewer.
cexRow
Scale factor for the row labels.
cexCol
Scale factor for the column labels.
...
Additional arguments to be passed downstream.

Value

  • None. Side effect is a plot.

References

https://github.com/bryanhanson/ChemoSpec

See Also

hmap which will get you to the package (there is no package index page); the vignette is a good place to begin (> vignette("seriation")).

Examples

Run this code
data(SrE.IR)
# remove noisy, uninteresting region:
newIR <- removeFreq(SrE.IR, rem.freq =
SrE.IR$freq > 1800 & SrE.IR$freq < 2500)
# now make the heat map:
myt <- expression(italic(S.)~italic(repens)~IR~Spectra)
hmapSpectra(newIR, title = myt, t.pos = c(0.5, 0.5, 0.5),
cexRow = 0.5, cexCol = 0.1, no.col = 9)

Run the code above in your browser using DataLab