plotRelCon: Boxplot or Histogram of Posterior distributions of Relative...

Description Usage Arguments See Also Examples

View source: R/plotRelCon.R

Description

This function plots the posterior distributions of relative concentrations, and saves the figure to pdf file. The file name is in the format of "spec_i_RelCon_j1toj2.pdf", where i are the spectrum numbers and j1 and j2 are the order numbers of fitted metabolites in the order of their input in file metaboliteList.csv. The figure file will not be overwritten if it already exists. A prefix can be added to file name for new saves.

Usage

1
2
3
4
 plotRelCon(BM, metaName, plotHist = FALSE, breaks, 
            saveFig = TRUE, saveFigDir = BM$outputDir, 
            prefixFig, rerun = FALSE, 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.

saveFig

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

saveFigDir

Save figure(s) in this directory. The default is output directory of BM.

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 and then plot relative concentration
if(interactive()) 
{
bm<-batman()
## Plot relative concentrations
plotRelCon(bm)
}

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