plotRtmsSample | R Documentation |
plotRtmsSample()
takes an RTMS sample object and produces a ggplot
object
depicting all extracted peaks, and their context windows if included.
plotRtmsSample(sample, usePeakNames = TRUE, freey = TRUE)
sample |
An object of class |
usePeakNames |
If the list of peaks used to create the sample was a named list, then setting this to TRUE (the default) will use those names to label the facets of the plotted sample. 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 peak's facet will be allowed to vary freely, so different peaks will be plotted on different scales. Setting this to FALSE will fix all peaks with in a sample on the same y-axis scale. |
A ggplot
object depicting the RTMS sample.
peaks <- rtmsPeakList(c(1516.83,1530.84),peakWidth=0.2,windowWidth = c(5,10))
names(peaks) <- c("Product","Substrate")
sample <- getSample(exampleSpectrum,peaks)
plot1 <- plotRtmsSample(sample)
plot2 <- plotRtmsSample(sample,freey=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.