plotMsData {xcms} | R Documentation |
The plotMsData
creates a plot that combines an (base peak )
extracted ion chromatogram on top (rt against intensity) and a plot of
rt against m/z values at the bottom.
plotMsData(x, main = "", cex = 1, mfrow = c(2, 1), grid.color = "lightgrey", colramp = colorRampPalette(rev(brewer.pal(9, "YlGnBu"))))
x |
|
main |
|
cex |
|
mfrow |
|
grid.color |
a color definition for the grid line (or |
colramp |
a color ramp palette to be used to color the data points
based on their intensity. See argument |
Johannes Rainer
extractMsData()
for the method to extract the data to plot.
## Read two files from the faahKO package library(faahKO) cdfs <- dir(system.file("cdf", package = "faahKO"), full.names = TRUE, recursive = TRUE)[1:2] raw_data <- readMSData(cdfs, mode = "onDisk") ## Extract the MS data from a slice of data msd <- extractMsData(raw_data, mz = c(334.9, 335.1), rt = c(2700, 2900)) ## Plot the data for the first file plotMsData(msd[[1]]) ## To plot the data for both files: layout(mat = matrix(1:4, ncol = 2)) plotMsData(msd[[1]], mfrow = NULL) plotMsData(msd[[2]], mfrow = NULL)