Given a true/target radiocarbon age, calculate the impact of contamination (for example, 1% contamination with modern carbon) on the observed age. Can optionally include contamination uncertainties, but then Monte Carlo iterations should be used (option MC=TRUE).
contaminate(
y,
er = 0,
percentage,
percentage.error = 0,
F.contam = 1,
F.contam.er = 0,
MC = TRUE,
its = 10000,
decimals = 5,
roundby = 1,
visualise = TRUE,
talk = TRUE,
eq.x = 5,
eq.y = c(),
eq.size = 0.75,
true.col = "darkgreen",
observed.col = "blue",
contamination.col = "red",
true.pch = 20,
observed.pch = 18,
contamination.pch = 17,
true.name = "true",
xlab = "contamination (%)",
ylab = "F14C",
ylim = c(),
C14.axis = TRUE,
bty = "u"
)
The observed radiocarbon age and error
The 'true' radiocarbon age
The error of the 'true' radiocarbon age
Relative amount of contamination. Must be between 0 and 1
Uncertainty of the contamination. Assumed to be normally distributed (which fails close to 0% or 100% contamination levels). Defaults to 0%.
the F14C of the contamination. Set at 1 for carbon of modern radiocarbon age, at 0 for 14C-free carbon, or anywhere inbetween.
error of the contamination. Defaults to 0.
Whether or not to use Monte Carlo iterations to estimate the values. Defaults to TRUE, because it treats uncertainties better than if set to FALSE.
Amount of iterations to use if MC=TRUE. Defaults to 10,000.
Rounding of the output for F values. Since details matter here, the default is to provide 5 decimals.
Rounding of the output for C14 ages. Defaults to 1 decimal.
By default, a plot is made to visualise the target and observed F14C values, together with the inferred contamination.
Whether or not to report the calculations made. Defaults to talk=TRUE
.
Leftmost location of the equation. Defaults to eq.x=5
. Can be set to values outside of (0,100) to make the equation invisible.
Vertical location of the equation. Defaults to the top of the graph.
Size of the font of the equation. In case the equation gets jumbled up upon resizing of a graphical device, just issue the previous `clean` command again. Defaults to eq.size=0.8
.
Colour for the target/true values. Defaults to "darkgreen".
Colour for the observed values. Defaults to blue.
Colour for the contamination values. Defaults to red.
Icon for the true/target date. Defaults to a filled circle.
Icon for the observed. Defaults to a diamond.
Icon for the contamination. Defaults to a triangle.
Name of the label of the true/target date
Name of the x-axis. Defaults to 'contamination (%)'.
Name of the y-axis. Defaults to 'F14C'.
Limits of the y-axis. Calculated automatically by default.
Whether or not to draw a secondary vertical axis for C14 ages. Defaults to C14.axis=TRUE
.
Draw a box around a box of a certain shape. Defaults to bty="u"
.
Maarten Blaauw
Whereas the function takes C14 ages and percentage contamination as input, internal calculations are done in the F14C realm and using fractions (between 0 and 1). The central calculation is `F_obs = ((1-frac)*F_true) + (frac*F_contam)`, where `F_obs` is the observed C14 age as F14C, `frac` is the fraction of contamination, `F_true` is the F14C of the true/target C14 age, and `F_contam` is the F activity of the contamination. In some extreme cases, the calculations will spit out unexpected results. Messages will be provided in most of these cases.
contaminate(5000, 20, 1, 0, 1) # 1% contamination with modern carbon
contaminate(66e6, 1e6, 1, 0, 1) # dino bone, shouldn't be dated as way beyond the dating limit
Run the code above in your browser using DataLab