A collection of functions for exploratory chemometrics of 2D spectroscopic data sets such as COSY (correlated spectroscopy) and HSQC (heteronuclear single quantum coherence) 2D NMR (nuclear magnetic resonance) spectra. 'ChemoSpec2D' deploys methods aimed primarily at classification of samples and the identification of spectral features which are important in distinguishing samples from each other. Each 2D spectrum (a matrix) is treated as the unit of observation, and thus the physical sample in the spectrometer corresponds to the sample from a statistical perspective. In addition to chemometric tools, a few tools are provided for plotting 2D spectra, but these are not intended to replace the functionality typically available on the spectrometer. 'ChemoSpec2D' takes many of its cues from 'ChemoSpec' and tries to create consistent graphical output and to be very user friendly.
miaLoadings
and pfacLoadings
were incorrectly reordering their matrices.inspectLvls
was not excluding any loading matrices when loading = NULL
.miaLoadings
and pfacLoadings
now check to see if the requested loading has already been computed, and if so, it is not computed again. Loadings are named Loading_x
in the Spectra2D
object. These functions also gain a plot argument so that plots can be suppressed if desired. These changes were made for dealing with large data sets which can occupy a lot of memory and slow down the computation of the contours. Using plot = FALSE
allows one to compute the loadings and then figure out desirable contour levels before running with plot = TRUE
.pfacSpectra2D
gains an argument setup
. If TRUE
and parallel = TRUE
the parallel computational environment is automatically configured for the user. If FALSE
the user is responsible for setting up the environment. This is useful if working on Azure or AWS EC2.plotSlice
added.showScale
now opens a pdf document showing the scale used with plotSpectra2D
.inspectLvls
.MUD1
rebuilt.plotSpectra2D
now accepts xlim
and ylim
.plotSpectra2D
now chosen via pretty()
and are easier to interpret.plotSpectra2D
gains an option for a grid aligned with the ticks.ChemoSpecUtils::.chkArgs
.hcaScores
added via ChemoSpecUtils
.ChemoSpecUtils
.ChemoSpecUtils
.plotScree
, which works with miaSpectra2D
.miaLoadings
.groupNcolor
moved to non-exported functions, and re-named to .groupNcolors
.import2Dspectra
extensively reworked to fix problems and allow for easy expansion in the future.files2Spectra2DObject
tweaked a bit.centscaleSpectra2D
and now centers and optionally scales the data.plotSpectra2D
so that it will plot more than one spectrum..findNA
..findNA
led to code clean up (better variable names and code notes).centerSpectra2D
.chkSpectra2D
.pfacLoadings
now returns the modified Spectra2D
object, not the loadings matrix.inspectLvls
can now access the loadings matrix, if present, in a Spectra2D
object.pfacSpectra2D
was fixed. This task is now handled by helper function .makeArray
since it is also required by centerSpectra2D
.pfacLoadings
simplified, and some logical errors fixed.MUD1
gains some negative peaks for more comprehensive graphical tests..mapColors
overhauled..plotEngine
overhauled..normAroundZero
overhauled, and renamed to .symAroundZero
.inspectLvls
to allow quick selection of levels.centerSpectra2D
function.MUD1
test data set.removePeaks2D
.removePeaks2D
(part of the problem was in .findNA
).sumSpectra2D
now reports the number of data points in F2 and the number of slices in F1.chkSpectra2D
does a better job of checking and reporting about extra data.ChemoSpec
materials.