| plotSpectraDist {ChemoSpec} | R Documentation |
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, ...)
spectra |
An object of S3 class |
method |
Character. Any method acceptable to |
ref |
Integer. The spectrum to be used as a reference. |
labels |
Logical. Shall the points be labeled? |
... |
Plot parameters to be passed to the plotting routines. |
A data frame containing the data plotted (sample names, sample colors, distances).
Bryan A. Hanson, DePauw University.
https://github.com/bryanhanson/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,
xlim = c(1,16), ylim = c(0, 0.3), srt = 90)