Plot the Distance Between Spectra and a Reference Spectrum in a Spectra Object
This function plots the distance between a reference spectrum and all other
spectra in a Spectra
object. Distance can be defined in a number of
ways (see Arguments).
plotSpectraDist(spectra, method = "pearson", ref = 1, labels = TRUE, ...)
A data frame containing the data plotted (sample names, sample colors, distances).
Bryan A. Hanson, DePauw University.
To compare all spectra simultaneously in a heatmap, see
sampleDist
. Additional documentation
at https://bryanhanson.github.io/ChemoSpec/
data(SrE.NMR) txt1 <- paste("Distance from", SrE.NMR$names[1]) # capture before padding txt2 <- paste("Rank Distance from", SrE.NMR$names[1]) SrE.NMR$names <- paste(" ", SrE.NMR$names, sep = "") # pad the names for better appearance temp <- plotSpectraDist(SrE.NMR, xlab = txt2, ylab = txt1, main = txt1, ylim = c(0, 1.1), xlim = c(0, 16), srt = 45 )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.