View source: R/elco_irms_correct_isotopes.R
elco_irms_correct_isotopes | R Documentation |
elco_irms_correct_isotopes
is a heuristic function to correct measured isotope signatures of samples
during IRMS analysis. Correction can be performed for either ^{13}C or ^{13}N and, if multiple
files are batch-processed, using either standards from all files or only from the file where the respective
sample is located in.
The procedure is as follows:
For a standard defined by the user, compute the median of the individually measured isotope signals for the selected isotope. The defined standard should be a trusted standard.
For the same standard, count the number of samples that have been measured. If this number is smaller
than a threshold t
, print a warning. This is done to avoid that correction is done without enough
samples to reliably compute a median value.
Look up the known reference isotope signature for the selected standard. Compute the difference between this value and the median of the isotope signature of the standard. Take this difference and subtract it from each measured value.
(Optionally): Extract the values of other standards after the correction, compute their medians, and check if the absolute deviation from the reference value is larger than some threshold. Print a warning if this is the case.
(Optionally): create a plot showing uncorrected and corrected isotope signatures for all measured standards along their known reference values. This plot may be used as a visual check of the heuristic correction procedure.
elco_irms_correct_isotopes( x, ref = irms_standards[irms_standards$standard_name == "BBOT", ], check = irms_standards, isotope = "13C", t = 5, by_file = TRUE, plotit = FALSE )
x |
An object of class |
ref |
A |
check |
A |
isotope |
A character value representing the isotope for which to correct isotope signatures. This must be one of "13C" or "15N". |
t |
An integer value specifying the number of measurements that must be available for a particular standard to make it eligible for being a reference for correcting the measured isotope values. |
by_file |
A logical value indicating if medians of standards are computed across different files
as indicated by |
plotit |
A logical value indicating if a plot for checking should be printed ( |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.