# You need to install package "seriation" for this example
if (requireNamespace("seriation", quietly = TRUE)) {
data(SrE.IR)
# Let's look just at the carbonyl region
IR <- removeFreq(SrE.IR, rem.freq = SrE.IR$freq > 1775 | SrE.IR$freq < 1660)
p <- plotSpectra(IR, which = 1:16, lab.pos = 1800)
# Defaults, except for color scheme:
res <- hmapSpectra(IR, col = heat.colors(5))
# Label samples and frequencies by passing arguments to stats:heatmap
# Also make a few other nice plot adjustments
res <- hmapSpectra(IR,
col = heat.colors(5),
row_labels = IR$names, col_labels = as.character(round(IR$freq)),
margins = c(4, 6)
)
}
Run the code above in your browser using DataLab