orbi_define_basepeak()
sets one isotopocule in the data frame as the base peak (ratio denominator) and calculates the instantaneous isotope ratios against it.
Value
Input data frame without the rows of the basepeak isotopocule and instead three new columns called basepeak
, basepeak_ions
, and ratio
holding the basepeak information and the isotope ratios vs. the base peak
Examples
fpath <- system.file("extdata", "testfile_flow.isox", package = "isoorbi")
df <- orbi_read_isox(file = fpath) |>
orbi_simplify_isox() |>
orbi_define_basepeak(basepeak_def = "M0")
#> orbi_read_isox() is loading .isox data from 1 file(s)...
#> - loaded 6449 peaks for 1 compounds (HSO4-) with 5 isotopocules (M0, 33S,
#> 17O, 34S, 18O) from testfile_flow.isox in 0.02 seconds.
#> orbi_simplify_isox() will keep only columns 'filepath', 'filename',
#> 'scan.no', 'time.min', 'compound', 'isotopocule', 'ions.incremental',
#> 'tic', 'it.ms'...
#> ...complete in 0.00 seconds.
#> orbi_define_basepeak() is setting the 'M0' isotopocule as the ratio
#> denominator...
#> ...set base peak and calculated 5159 ratios for 4 isotopocules/base peak
#> (33S, 17O, 34S, 18O) in 0.06 seconds.