plot.massdiffhist: Plot massdiffhist histogram with named adducts labeled

Description Usage Arguments

View source: R/plot.massdiffhist.R

Description

Plot massdiff histogram with option of labeling peaks corresponding to known adducts or chemical transformations. The best-matching adducts for each histogram bin are found internally with adductMatch.histogram.

Usage

1
2
3
4
5
## S3 method for class 'massdiffhist'
plot(hist, add = mass2adduct::adducts,
  labels = NULL, pch = 0, col = "blue", cex = 0.5, pos = 4,
  main = "Mass difference histogram", xlab = "mass difference (m/z)",
  ...)

Arguments

hist

Histogram of a massdiff object produced by hist.massdiff

add

data.frame; adduct data to use to annotate the mass diff peaks, (default: built-in data set adducts)

labels

numeric; label histogram peaks with top N adducts from the adduct table specified to option add (default: NULL - no labels)

pch

Plot character to use for highlighting adduct peaks

col

Color for labels and text

cex

Character scaling for labelled points and text

pos

Position of text label, values 1, 2, 3, 4 are below, left, above, and to the right of points respectively.

main

character; Title for histogram plot

xlab

character; X-axis label

...

Other parameters to pass to plot


kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.