topAdducts: Find top adduct candidates from a mass difference histogram

Description Usage Arguments Value See Also

View source: R/topAdducts.R

Description

Identify mass differences with the most observations and report closest- matching known adducts. This also reports mass differences which do not have a close match to a known adduct, unlike adductMatch

Usage

1
2
topAdducts(hist, add = mass2adduct::adducts, n = 20, use.bw = TRUE,
  threshold = NULL)

Arguments

hist

histogram of a massdiff object

add

data.frame of adducts (default: "adducts" dataset of mass2adduct)

n

numeric; number of top hits to report (default 20)

use.bw

logical; adduct is reported as match only if it falls in the same histogram bin (default: TRUE)

threshold

numeric; maximum distance between adduct mass and mass difference peak to report adduct as a match. use.bw must be FALSE (default: NULL)

Value

data.frame of mass bins, counts, closest-matching adduct if known

See Also

adductMatch to find the closest-matching mass differences for a list of known adducts (the converse of the current function)


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