plotMetaFit: Plot Posterior Means of Metabolites Fit with 95% Credible...

Description Usage Arguments See Also Examples

View source: R/plotMetaFit.R

Description

This function plots posterior means of the metabolite fit with 95% credible interval , and saves the figure to pdf file in specified directory. For multiple metabolites, the file name is in the format of "spec_itoj_mFitSam.pdf", where i and j are range numbers of spectra in the figure. A maximum of 2 spectra will be shown in each figure. Figure file will not be overwritten if it already exists. Prefix can be added to the file name for new saves.

Usage

1
2
3
4
 plotMetaFit(BM, from, to, metaName, saveFig = TRUE,
             saveFigDir = BM$outputDir, prefixFig, 
             rerun = FALSE, overwriteFig = FALSE,
             showPlot)	

Arguments

BM

batman output data frame.

from

The start ppm value to plot. Default is set to the start ppm value of the whole processed range.

to

The end ppm value to plot. Default is set to the end ppm value of the whole processed range.

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.

saveFig

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

saveFigDir

Save figure in this directory. The default is current working directory.

prefixFig

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

rerun

Set to FALSE to plot batman result, and TRUE to plot batmanrerun result.

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 fit, then plot metabolite fit
if(interactive()) 
{
bm<-batman()
## Plot metabolites Fit.
plotMetaFit(bm)
}

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