expand_adducts: Expand mass to list of adducts

Description Usage Arguments Value

View source: R/expand_adducts.R

Description

Expand a table with masses to a table with selected adducts and fragments and their mz values. This function takes a table with a column mass and calculates the mz value of all selected adducts and fragments.

Usage

1
2
expand_adducts(cmp_tbl, mode = "pos", adducts = c("[M+H]+", "[M+Na]+",
  "[2M+H]+", "[M+K]+", "[M+H-H2O]+"))

Arguments

cmp_tbl

tibble of compounds. The tables should contain a column named "mass".

mode

A string. Either "pos", "neg" or "ei".

adducts

Character vector. Any adduct listed in the adduct list found here: https://github.com/stanstrup/chemhelper/tree/master/inst/extdata. Examples: "[M+H]+", "[M+Na]+", "[M-H]-", "[M+Cl]-".

Value

A tibble containing the same columns as the input table but with added columns: adduct, charge, nmol, mz, mode.


stanstrup/PeakABro documentation built on May 29, 2019, 9:49 a.m.