View source: R/AddPlottingStuff.R
AddPlottingStuff | R Documentation |
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.
AddPlottingStuff(Y.peaks, X.ppm = NULL, groupLabels = NULL)
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). |
Returns a data frame with added plotting variables (groupPPM for aligned features and labels for plotting).
Charlie Beirnaert, charlie.beirnaert@uantwerpen.be
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.