| calc_ideg | R Documentation |
This function calculates the degradation index ('Ideg') following Flerus et al. (2012). High Ideg values indicate 'older' marine DOM (i.e., a higher contribution of peaks that correlate negatively with delta14C), while low values indicate 'younger' DOM (i.e., a higher contribution of peaks that correlate positively with delta14C)./
Ideg is computed as the ratio of summed magnitudes for five negative (NEG) molecular formulas to the total summed magnitudes of five positive (POS) and five negative (NEG) molecular formulas:
Ideg = \frac{\sum{NEG}}{\sum{NEG} + \sum{POS}}
The index ranges from 0 to 1 and is valid only if all required formulas (n = 10) are present. Ideg depends strongly on the type of sample preparation, ionization method, and instrument settings, and should only be interpreted for relative changes within the same dataset.
calc_ideg(
mfd,
mf_col = "mf",
magnitude_col = "i_magnitude",
grp = "file_id",
...
)
mfd |
data.table with molecular formula data as derived from
|
mf_col |
Character. The name of the column containing molecular formulas. Default is "mf". |
magnitude_col |
Character. The name of the column containing magnitude values (absolute or relative). Default is "i_magnitude". |
grp |
Character vector. Names of columns (e.g., sample or file identifiers) used to aggregate results. |
... |
Additional arguments passed to methods. |
A data.table with columns:
grp: Grouping variable.
ideg: Calculated degradation index (rounded to 3 decimals).
ideg_n: Number of assigned formulas used in the calculation.
Other calculations:
calc_data_summary(),
calc_dbe(),
calc_eval_params(),
calc_exact_mass(),
calc_ma(),
calc_neutral_mass(),
calc_nm(),
calc_norm_int(),
calc_number_assignment(),
calc_number_occurrence(),
calc_recalibrate_ms()
# Create a minimal dataset containing all required POS and NEG formulas
library(data.table)
demo_ideg <- data.table(
file_id = 1,
mf = c(
"C17H20O9", "C19H22O10", "C20H22O10", "C20H24O11", "C21H26O11", # NEG
"C13H18O7", "C14H20O7", "C15H22O7", "C15H22O8", "C16H24O8" # POS
),
i_magnitude = c(
1200, 900, 1500, 700, 800, # NEG intensities
2000, 1800, 2200, 1600, 1900 # POS intensities
)
)
calc_ideg(
mfd = demo_ideg,
mf_col = "mf",
magnitude_col = "i_magnitude",
grp = "file_id"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.