plotShift: Boxplot or Histogram of ppm Shift Posterior distributions for...

Description Usage Arguments See Also Examples

View source: R/plotShift.R

Description

This function provides boxplots or histograms of the ppm shift posterior distributions of multiplets, and saves the figure to pdf file in specified directory. The file name is in the format of "spec_i_metaName_ppmShift.pdf", where i is the spectrum number and "metaName" is the input metabolite name if given. The figure file will not be overwritten if it already exists. A prefix can be given to the file name for new saves.

Usage

1
2
3
 plotShift(BM, metaName, plotHist = FALSE, breaks, perMult = FALSE,
           saveFig = TRUE, saveFigDir = BM$outputDir, prefixFig, 
           overwriteFig = FALSE, showPlot)

Arguments

BM

batman output data frame.

metaName

Only multiplets belonging to the named Metabolite will be shown. Only one metabolite name can be given. If missing, all metabolites will be plotted.

plotHist

If plotHist = TRUE, the ppm shift posteriors will be displayed as histogram. The default is FALSE.

breaks

A single number to set the number of bins for the histogram. If missing from the input, it is set to the data length divided by 3.

perMult

If set TRUE plot the shifts per multiplet, otherwise, plot the shifts per spectrum.

saveFig

Save figure to pdf file if set TRUE. The default is TRUE.

saveFigDir

Save pdf file in this directory. The default is the output directory of BM.

prefixFig

Add prefix to each saved figure name. The default is no prefix.

overwriteFig

Overwrite saved figure file in pdf format if overwriteFig = TRUE. If set to FALSE, a new figure file with system time as postfix will be created. The default is FALSE.

showPlot

If set FALSE, no plot will be shown on display, the pdf file(s) for the figure plot(s) will be created in output folder. If missing from input, for windows and osx operating systems, it will be set to TRUE, for the rest operating systems, it will be set to FALSE automatically.

See Also

batman, batmanrerun

Examples

1
2
3
4
5
6
7
8
library(batman)
## Run BATMAN
if(interactive()) 
{
bm<-batman()
## Plot ppm shift for each multiplet.
plotShift(bm)
}

batman documentation built on May 2, 2019, 6:13 p.m.