AddPlottingStuff {speaq} | R Documentation |
Add plotting variables
Description
This functions adds a few variables which make plotting features easier (and more informative). Since for example every peaks keeps it original ppm value, if you want to plot the groups this function adds the group ppm value. Also sample labels can be added.
Usage
AddPlottingStuff(Y.peaks, X.ppm = NULL, groupLabels = NULL)
Arguments
Y.peaks |
data frame obtained from either of the 'getWaveletPeaks', 'PeakAligner' or 'PeakFilling' function. |
X.ppm |
The vector with the ppm values (numeric vector). |
groupLabels |
The groupLabels (numeric or factor). |
Value
Returns a data frame with added plotting variables (groupPPM for aligned features and labels for plotting).
Author(s)
Charlie Beirnaert, charlie.beirnaert@uantwerpen.be
Examples
subset <- GetWinedata.subset()
subset.spectra = as.matrix(subset$Spectra)
subset.ppm = as.numeric(subset$PPM)
test.peaks <- getWaveletPeaks(Y.spec=subset.spectra,
X.ppm=subset.ppm,
nCPU = 1) # nCPU set to 2 for the vignette build
test.peaks.plot = AddPlottingStuff(test.peaks, subset.ppm, subset$Color)
#head(test.peaks.plot)
[Package speaq version 2.7.0 Index]