plot.peakData: Plot method for peakData objects

View source: R/plot.peakIcrData.R

plot.peakDataR Documentation

Plot method for peakData objects

Description

Depending on the scale of the object provided, this function with either construct a barplot of the number of peaks observed for each sample (presence/absence data) or boxplot of values of observed peaks per sample (all others). Samples will be colored by group, if grouping information is present in ftmsObj.

Usage

## S3 method for class 'peakData'
plot(x, title = NA, xlabel = NA, ylabel = NA, colorBy = "groups", ...)

Arguments

x

peakData object

title

optional title for the plot

xlabel

optional label for X axis, if not provided "Sample" will be used

ylabel

optional label for Y axis, if not provided a label will be constructed based on data scale (e.g. "Abundance" or "Number Observed")

colorBy

"groups" to color by groups, "molform" for whether or not the peak has a molecular formula (presence/absence only), or NA to make all bars the same color

...

included for compliance with generic method

Value

a plotly graph object

Examples

## Not run: 
plot(edata_transform(examplePeakData, "log2"))
plot(edata_transform(exampleProcessedPeakData, "pres"))

## End(Not run)

EMSL-Computing/fticRanalysis documentation built on Dec. 18, 2024, 9:51 p.m.