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
.
# S3 method for peakData
plot(x, title = NA, xlabel = NA, ylabel = NA, colorBy = "groups", ...)
peakData object
optional title for the plot
optional label for X axis, if not provided "Sample" will be used
optional label for Y axis, if not provided a label will be constructed based on data scale (e.g. "Abundance" or "Number Observed")
"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
a plotly
graph object
if (FALSE) {
plot(edata_transform(examplePeakData, "log2"))
plot(edata_transform(exampleProcessedPeakData, "pres"))
}