Calibrate d15 values with the given standards

calibrate_d15(
  data,
  d15,
  area = mean(area[category %in% names(standards)]),
  standards = c(`USGS-34` = -1.8, `IAEA-NO3` = 4.7),
  infer_ref_gas = TRUE,
  infer_bgrd = TRUE,
  quiet = FALSE
)

Arguments

data

(can be a grouped_by data set)

d15

the d15 column

area

the area (signal) column if want to use this as a calibration parameter (default is just the mean of the standards)

standards

a set of isotope standards Note: they are matched to the data by "category" (not by name)

infer_ref_gas

whether to infer reference gas (N2O) isotopic composition from the regression

infer_bgrd

whether to infer bacterial background from the regression

Value

introduces the column d15.cal and parameters p.15_stds, p.d15_m and p.d15_b as well as p.bgrd_area and p.bgrd_d15

Note

implement single point correction

consider removing the storage of the regression parameters since they can be inferred from the others