Learn R Programming

ChemoSpec (version 1.48-4)

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 heirchical cluster analysis and then re-ordrering the clusters in a coordinated way across each dimension. See the reference.

Usage

hmapSpectra(spectra, no.col = 5, title = "no title provided",
t.pos = c(0.5, 0.5, 0.5), cexRow = 1, cexCol = 1, ...)

Arguments

Value

None. Side effect is a plot.

References

http://academic.depauw.edu/~hanson/ChemoSpec/ChemoSpec.html

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(CuticleIR)
# trim it down so plot is not so crowded:
newIR <- removeFreq(CuticleIR, rem.freq =
CuticleIR$freq > 1500 | CuticleIR$freq < 500)
# remove some random samples too:
newIR <- removeSample(newIR, rem.sam = sample(1:157, 107))
# now make the heat map:
hmapSpectra(newIR, title = "Cuticle IR", t.pos = c(0.45, 0.25, 1),
cexRow = 0.5, cexCol = 0.1, no.col = 9)

Run the code above in your browser using DataLab