plotFeatures | R Documentation |
Plot the raw data spectrum for several files in a ptrSet object around
the mz
masses. The expiration average spectrum is in full lines,
and background in dashed lines.
plotFeatures(
set,
mz,
typePlot = "plotly",
addFeatureLine = TRUE,
ppm = 2000,
pdfFile = NULL,
fileNames = NULL,
colorBy = "rownames"
)
## S4 method for signature 'ptrSet'
plotFeatures(
set,
mz,
typePlot = "plotly",
addFeatureLine = TRUE,
ppm = 2000,
pdfFile = NULL,
fileNames = NULL,
colorBy = "rownames"
)
set |
a |
mz |
the mz values to plot |
typePlot |
set "plotly" to get an interactive plot, or "ggplot" |
addFeatureLine |
boolean. If TRUE a vertical line at the mz masses is plotted |
ppm |
windows size of the plot round |
pdfFile |
a file path to save a pdf with a individual plot per file |
fileNames |
vector of character. The file names you want to plot.
If |
colorBy |
character. A column name of sample metadata by which the line are colored. |
a plotly or ggplot2 object
dirRaw <- system.file("extdata/exhaledAir", package = "ptairData")
exhaledPtrset <- createPtrSet(dir=dirRaw,
setName="exhaledPtrset", mzCalibRef = c(21.022, 60.0525),
fracMaxTIC = 0.7, saveDir = NULL )
plotF<-plotFeatures(exhaledPtrset ,mz=59.049,type="ggplot",colorBy="subfolder")
print(plotF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.