plotRtmsSampleSet | R Documentation |
plotRtmsSampleSet()
takes an RTMS sample set object and produces a ggplot
object depicting all extracted peaks, and their context windows if included.
plotRtmsSampleSet(sampleset, usePeakNames = TRUE, freey = TRUE)
sampleset |
An object of class |
usePeakNames |
If the list of peaks used to create the sample set was a named list, then setting this to TRUE (the default) will use those names to label the facets of the plotted sample set. If set to FALSE, the facets will be labelled with the m/z values of each peak. This parameter will be ignored if the peaks are unnamed. |
freey |
If TRUE (the default) the y-axes of each sample and peak's facet will beallowed to vary freely, so different facets will be plotted on different scales. Setting this to FALSE will fix all peaks and samples on the same y-axis scale. |
A ggplot
object depicting the RTMS sample set.
peaks <- rtmsPeakList(c(1516.83,1530.84),peakWidth=0.2,windowWidth = c(5,10))
names(peaks) <- c("Product","Substrate")
sample <- getSample(exampleSpectrum,peaks)
sampleSet <- rep(sample,3)
names(sampleSet) <- c("A","B","C")
plot1 <- plotRtmsSampleSet(sampleSet)
plot2 <- plotRtmsSampleSet(sampleSet,freey=FALSE) + ggplot2::theme_bw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.