plotRtmsSampleSet {rtms}R Documentation

Plot an RTMS sample set object

Description

plotRtmsSampleSet() takes an RTMS sample set object and produces a ggplot object depicting all extracted peaks, and their context windows if included.

Usage

plotRtmsSampleSet(sampleset, usePeakNames = TRUE, freey = TRUE)

Arguments

sampleset

An object of class rtmsSampleSet.

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.

Value

A ggplot object depicting the RTMS sample set.

Examples

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()

[Package rtms version 0.2.0 Index]