| Title: | Pb-210 Dating of Sediment Cores |
|---|---|
| Description: | Dates sediment cores from lead-210 (Pb-210) activity profiles measured by alpha or gamma spectrometry, following the unified formulation and nomenclature of Sanchez-Cabeza and Ruiz-Fernandez (2012) <doi:10.1016/j.gca.2010.12.024>. Implements the Constant Flux (CF) and Constant Flux Constant Sedimentation (CFCS) dating models, together with supporting tools for data input, decay correction, missing inventory estimation, calculation of sediment and mass accumulation rates, and Monte Carlo propagation of dating uncertainties as described in Sanchez-Cabeza et al. (2014) <doi:10.1016/j.quageo.2014.06.002>. Also provides functions to visualize activity profiles and resulting age models. |
| Authors: | Joan-Albert Sanchez-Cabeza [aut, cre, cph] (Universidad Nacional Autonoma de Mexico), Ana Carolina Ruiz-Fernandez [aut] (Universidad Nacional Autonoma de Mexico), David Morina Soler [aut] (Universitat Autònoma de Barcelona) |
| Maintainer: | Joan-Albert Sanchez-Cabeza <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0.1 |
| Built: | 2026-09-21 09:44:26 UTC |
| Source: | https://github.com/cran/pb210dating |
This function plots the age model after Pb dating and, if provided,
the validation information (e.g., independent chronological markers).
It also provides the statistical significance of the validation.
AgeModel( List, SavePNG = TRUE, Path, PlotName = "Age_Model", DepthMin = NA, DepthMax = NA, TimeMin = 1900, TimeMax = NA, Verbose = TRUE, ... )AgeModel( List, SavePNG = TRUE, Path, PlotName = "Age_Model", DepthMin = NA, DepthMax = NA, TimeMin = 1900, TimeMax = NA, Verbose = TRUE, ... )
List |
Dating object, created by |
SavePNG |
Logical. Only if TRUE, saves a high-resolution PNG file. |
Path |
Character. Directory where the PNG file will be written when
|
PlotName |
Name of the plot (without extension) to be produced.
The extension will automatically be set to |
DepthMin |
Minimum depth (cm) of the age model plot. Default is |
DepthMax |
Maximum depth (cm) of the age model plot. Default is |
TimeMin |
Minimum time (decimal age) of the age model plot. Default is |
TimeMax |
Maximum time (decimal age) of the age model plot. Default is |
Verbose |
Logical. If TRUE, prints progress logs to the console. |
... |
Extra arguments passed to plotting functions (e.g., |
The age model is a representation of age (year CE) versus depth. For each point, both uncertainty bars are plotted. Minimum and maximum values for plotting are automatically calculated if not explicitly provided.
For validation, two approaches are used.
For visual validation, 1- (68%, red) and 2- (95%, pink)
ellipses of each validation point are plotted.
The validation ellipses are calculated assuming that the
variables (year and depth of the event) follow a uniform (square) distribution.
The validation ellipses include the user-provided label. As in most cases these will correspond to radionuclides, numbers are superscript, so we recommend using the format "123Element" (e.g., 137Cs).
For statistical validation, a significance (p-value) of the Mahalanobis distance between the validation point and each age-model curve, is also provided.
Generates a .PNG plot of the age model with validation ellipses
and p-values.
The plot is also reproduced in the R graphics device (e.g., RStudio plots pane).
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
a <- ReadData(Verbose = FALSE) # Reads example file a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium(a, Interactive = FALSE, Verbose = FALSE) a <- Pb210CF(a, MonteCarloRunsCF = 1000, Verbose = FALSE) AgeModel(a, SavePNG = FALSE, Path = tempdir(), Verbose = FALSE) a <- Pb210CFCS(a, MonteCarloRunsCFCS = 1000, Verbose = FALSE) AgeModel(a, SavePNG = FALSE, Path = tempdir(), Verbose = FALSE)a <- ReadData(Verbose = FALSE) # Reads example file a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium(a, Interactive = FALSE, Verbose = FALSE) a <- Pb210CF(a, MonteCarloRunsCF = 1000, Verbose = FALSE) AgeModel(a, SavePNG = FALSE, Path = tempdir(), Verbose = FALSE) a <- Pb210CFCS(a, MonteCarloRunsCFCS = 1000, Verbose = FALSE) AgeModel(a, SavePNG = FALSE, Path = tempdir(), Verbose = FALSE)
The function completes missing values in sediment core profiles used for
Pb radiochronology.
Only interpolation (not extrapolation) is performed. It leaves original data intact.
CompleteProfile(List, Verbose = TRUE)CompleteProfile(List, Verbose = TRUE)
List |
Dating list created by |
Verbose |
Logical.Print progress messages. Default is |
Required surface values: MassSection and Pb210ExcessDecay.
Ra226 is optional. If no Ra data is provided, it is skipped with a warning.
Interpolation rules:
MassSection: Linear interpolation vs. mean depth.
Ra226: Linear interpolation vs. cumulative mass.
Pb210ExcessDecay: Exponential interpolation vs. cumulative mass.
Updated dating list with complete profiles.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) message("Complete Pb-210 (Bq/kg): ", paste0(round(a$Val$Pb210ExcessDecayComplete), " "))a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) message("Complete Pb-210 (Bq/kg): ", paste0(round(a$Val$Pb210ExcessDecayComplete), " "))
If no Ra values are available, this function estimates a constant
supported (base) Pb activity from the bottom-most
Po or Pb total activities.
ConstantRa(List, Mode = "auto", Verbose = TRUE)ConstantRa(List, Mode = "auto", Verbose = TRUE)
List |
Dating list created by |
Mode |
Character. Total activity used to determine the constant Ra-226 activity.:
|
Verbose |
Logical. Shows estimation details (default |
At least three non-NA values are required.
The algorithm starts from the core bottom and, if needed, progressively includes more sections to calculate the mean and standard deviation. It stops when the activity of the section immediately above is significantly higher than the current mean + 2 SD (indicating the equilibrium zone has been found).
The resulting mean is assigned as constant Ra226 for the entire profile.
Important: The user should carefully review the result. This function only handles simple cases. If the profile does not reach equilibrium, the last value is used as fallback but it is likely wrong.
Updated dating list with constant Ra and its uncertainty.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
ReadData, DecayCorrection,
Equilibrium, EquilibriumSet
a <- ReadData (Verbose = FALSE) a <- ConstantRa(a, Verbose = FALSE, Mode = "Po") message("Ra-226 (Bq/kg) = ", round(a$Val$Ra226[1]), " +- ", round(a$Unc$Ra226[1]))a <- ReadData (Verbose = FALSE) a <- ConstantRa(a, Verbose = FALSE, Mode = "Po") message("Ra-226 (Bq/kg) = ", round(a$Val$Ra226[1]), " +- ", round(a$Unc$Ra226[1]))
Corrects the measured (not-decay-corrected) total activities ('Pb210Total' for gamma spectrometry and 'Po210Total' for alpha spectrometry) from the counting/plating period back to the core sampling date.
This function must be called immediately after ReadData and
before CompleteProfile, ConstantRa, or any dating model.
The function uses the per-section dates supplied in the input file
('DatePlating', 'MeasurementAlphaStart', 'MeasurementAlphaEnd',
'MeasurementGammaStart', 'MeasurementGammaEnd').
If dates are not provided, no decay correction is performed.
If no Ra is present (or missing where Pb/Po data exist) it interpolates linearly
in depth only the needed positions.
Correction rules for Pb (the activity that will be used for dating):
Gamma (Pb): corrected with from the sampling date to the mid-point of the gamma measurement interval.
Alpha (Po): corrected with from the sampling date to the plating date
+ from the plating date to the mid-point of the alpha measurement interval
(secular equilibrium assumption).
Uncertainties are scaled by the same correction factor(s). The function works whether the core file contains only gamma, only alpha, or both datasets.
DecayCorrection(List, Verbose = TRUE)DecayCorrection(List, Verbose = TRUE)
List |
Dating list returned by |
Verbose |
Logical. Print progress messages (default |
Updated dating list with Decay, Excess, and ExcessDecay fields
in $Val and $Unc.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) message("Decay corrected values (Bq/kg): ", paste0(round(a$Val$Pb210ExcessDecay), " "))a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) message("Decay corrected values (Bq/kg): ", paste0(round(a$Val$Pb210ExcessDecay), " "))
Estimates the layer below which there is no measurable excess Pb
(the "equilibrium layer"). This value is critical for the CF dating model.
The function works after DecayCorrection,
so the presence of Pb210ExcessDecay is expected.
Equilibrium(List, Interactive = TRUE, Verbose = TRUE)Equilibrium(List, Interactive = TRUE, Verbose = TRUE)
List |
Dating list created by |
Interactive |
Logical. If |
Verbose |
Logical. If TRUE, prints progress logs to the console (default |
Excess Pb is shown with 1-sigma uncertainty.
In interactive mode the x-axis shows tick marks and labels exactly centered
under each red-blue bar pair. You can zoom in/out.
Updated dating list with the value of Val$LayerDating.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
ConstantRa, EquilibriumSet, MissingInventory,
Pb210CF, Pb210CFCS
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) message("Equilibrium depth = ", a$Val$LayerDating, " cm")a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) message("Equilibrium depth = ", a$Val$LayerDating, " cm")
Manually assigns the deepest layer below which there is no measurable excess Pb
(the "equilibrium layer"). This value is required for the dating models.
Use this function when you prefer to override the automatic proposal or the interactive
selection performed by Equilibrium.
EquilibriumSet(List, LayerDating, Verbose = TRUE)EquilibriumSet(List, LayerDating, Verbose = TRUE)
List |
Dating list created by |
LayerDating |
Numeric. Bottom depth (cm) of the equilibrium layer.
It must be one of the values present in |
Verbose |
Logical. If TRUE, prints progress logs to the console (default |
The function performs a strict validation: LayerDating must match exactly
one of the section bottom depths. No interpolation or nearest-neighbour matching is done.
Updated dating list with the value of LayerDating stored in
$Val$LayerDating.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
ConstantRa, Equilibrium, MissingInventory,
Pb210CF, Pb210CFCS
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- EquilibriumSet (a, Verbose = FALSE, LayerDating = 16) message("Equilibrium layer set to ", a$Val$LayerDating, " cm.")a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- EquilibriumSet (a, Verbose = FALSE, LayerDating = 16) message("Equilibrium layer set to ", a$Val$LayerDating, " cm.")
Generates a plotmath expression that renders a
radionuclide symbol with the mass number as a superscript immediately
preceding the element symbol (e.g. Cs, Pb), in
accordance with IUPAC typographic conventions. The returned object is
accepted directly by the xlab, ylab, and main
arguments of all base-R plotting functions, as well as by
axis, mtext, and
text.
IsotopeLabel(x, suffix = NULL, units = NULL)IsotopeLabel(x, suffix = NULL, units = NULL)
x |
A single character string specifying the isotope in any of the
plain-text notations commonly used in the literature. Accepted formats
are illustrated below; matching is case-insensitive for the element
symbol. Alternatively, a two-element character vector
|
suffix |
An optional character string appended immediately after the element symbol. Three formats are recognised:
Default |
units |
An optional plotmath string appended after the isotope label,
separated by a thin space ( |
A parsed expression object of length 1, suitable
for direct use wherever R's plotmath rendering is needed.
IsotopeLegend for legend entries;
plotmath for the full plotmath syntax reference.
Generates a single expression object of length
containing one typeset radionuclide label per entry, suitable for
direct use as the legend argument of
legend.
IsotopeLegend(isotopes, suffix = NULL, units = NULL)IsotopeLegend(isotopes, suffix = NULL, units = NULL)
isotopes |
A character vector of isotope strings in any format accepted
by |
suffix |
A character vector of suffix strings (recycled). See the
|
units |
A character vector of plotmath unit strings (recycled).
Default |
legend requires its legend argument to be
either a plain character vector or a single expression object
whose elements correspond one-to-one to legend entries. This function
ensures that requirement by calling parse on the full
character vector of plotmath strings at once, which returns an expression of
the correct length.
Each element is formatted by the same rules as IsotopeLabel;
the suffix and units arguments are recycled across all entries
if a vector shorter than isotopes is supplied.
A parsed expression object of length
length(isotopes), ready to be passed as legend = in a call
to legend.
IsotopeLabel for single labels on axes and titles.
In a sediment core dated with the Pb210CF model,
equilibrium may not be reached at the core bottom.
This function estimates the missing Pb inventory
(below the deepest layer) so that the Constant Flux (CF) model
can be applied.
Three estimation modes are available:
reference_date (or any string containing "ref" or "dat"): Uses an independent chronomarker from the validation file.
mean_mar (or any string containing "mea"): Uses the mean mass
accumulation rate of the deepest Bottom_n sections excluding
the last section (which always has MAR = 0 when no missing
inventory is yet assumed).
fitted_mar (or any string containing "fit"): Fits
versus mass depth on the deepest Bottom_n sections.
At the end, the function re-runs Pb210CF(List)
with the updated MissingInventoryBottom (or MissingInventoryTop)
to provide consistent ages and accumulation rates.
MissingInventory( List, Mode = "reference_date", ValidationNumber = 1, Bottom_n = 3, MonteCarloRunsCF = 2e+05, Verbose = TRUE )MissingInventory( List, Mode = "reference_date", ValidationNumber = 1, Bottom_n = 3, MonteCarloRunsCF = 2e+05, Verbose = TRUE )
List |
Dating list returned by |
Mode |
Character. One of |
ValidationNumber |
Integer. Which validation point (row in the
validation table) to use when |
Bottom_n |
Integer. Number of deepest dated sections to use for
MAR calculation when |
MonteCarloRunsCF |
Number of Monte Carlo iterations for uncertainty. Default is 2e5. Use 0 to skip uncertainty calculations. |
Verbose |
Logical. If TRUE, prints progress logs (default TRUE). |
Updated dating list with the missing inventory in
Val$MissingInventoryBottom (or Val$MissingInventoryTop)
and the estimated Monte Carlo uncertainty in the corresponding Unc$ entry.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
Equilibrium, Pb210CF, Pb210CFCS
TehuaIIMI <- system.file("extdata", "TehuaIIMI.csv", package = "pb210dating") a <- ReadData(TehuaIIMI, Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 100) b <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "mean") message("Bottom missing inventory (Bq/m2) = ", round(b$Val$MissingInventoryBottom)) c <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "fit") message("Bottom missing inventory (Bq/m2) = ", round(c$Val$MissingInventoryBottom)) d <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "ref") message("Bottom missing inventory (Bq/m2) = ", round(d$Val$MissingInventoryBottom))TehuaIIMI <- system.file("extdata", "TehuaIIMI.csv", package = "pb210dating") a <- ReadData(TehuaIIMI, Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 100) b <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "mean") message("Bottom missing inventory (Bq/m2) = ", round(b$Val$MissingInventoryBottom)) c <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "fit") message("Bottom missing inventory (Bq/m2) = ", round(c$Val$MissingInventoryBottom)) d <- MissingInventory(a, Verbose = FALSE, MonteCarloRunsCF = 100, Mode = "ref") message("Bottom missing inventory (Bq/m2) = ", round(d$Val$MissingInventoryBottom))
Creates one single CSV file with per-section data in and core-wide constants in the last four columns ('Name', 'Value', 'Uncertainty', 'p-value').
Output(List, Path, Verbose = TRUE)Output(List, Path, Verbose = TRUE)
List |
Dating list created by |
Path |
Character. Directory where the output files will be written. |
Verbose |
Logical.Print progress messages. Default is |
Invisibly returns the final data.frame. Side effect: writes
"<CoreName>_results.csv" and "<CoreName>.out" in Path.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
ReadData, Pb210CF,
Pb210CFCS, MissingInventory.
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- ConstantRa (a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 1000) Output(a, Path = tempdir(), Verbose = TRUE)a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- ConstantRa (a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 1000) Output(a, Path = tempdir(), Verbose = TRUE)
Performs Pb dating using the Constant Flux (CF) model.
Based on Sanchez-Cabeza and Ruiz-Fernandez (2012).
Pb210CF(List, MonteCarloRunsCF = 2e+05, Verbose = TRUE)Pb210CF(List, MonteCarloRunsCF = 2e+05, Verbose = TRUE)
List |
Dating list created by |
MonteCarloRunsCF |
Number of Monte Carlo iterations for uncertainty estimation.
Default is 2E5. Use |
Verbose |
Logical.Print progress messages. Default is |
Missing inventories at the top (MissingInventoryTop) and bottom
(MissingInventoryBottom) of the core are supported but their use requires
careful justification. The core is assumed to be cylindrical.
Uncertainties are propagated via Monte Carlo simulation
(Sanchez-Cabeza et al., 2014).
Updated dating list. Results in $Val, uncertainties in $Unc.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
CompleteProfile, Pb210CFCS,
AgeModel, Equilibrium, EquilibriumSet,
MissingInventory, Output, PlotMARSAR.
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium(a, Interactive = FALSE, Verbose = FALSE) a <- Pb210CF(a, MonteCarloRunsCF = 1000, Verbose = FALSE) message("CF years = ", paste0(round(a$Val$YearSectionMean), " "))a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium(a, Interactive = FALSE, Verbose = FALSE) a <- Pb210CF(a, MonteCarloRunsCF = 1000, Verbose = FALSE) message("CF years = ", paste0(round(a$Val$YearSectionMean), " "))
Performs Pb dating using the Constant Flux and Constant Sedimentation (CFCS) model,
with optional piece-wise segments, although this option is not yet fully implemented.
The user should consider if the profile can meet simultaneoulsy
the hypothesis of constant excess Pb flux and constant sedimentation.
In principal, the user must indicate to which depth the model can be used.
Although debatable, some authors use a piece-wise model (by segments),
and the user can also provide the proposed break points for the model.
However, one must take into account that, in this case,
the constant flux hypothesis is only maintained in each profile segment.
When selecting the break sections, the user should be aware of the limitations of linear regression analysis. This very much depends on the dataset and the expected robustness, but we think that a linear regression of less than 5 points may usually be not statitiscally significant.
Please note the required contents of the Breaks() vector, which also defines the maximum layer to which CFCS fitting will be done.
Pb210CFCS(List, Breaks = NA, MonteCarloRunsCFCS = 10000, Verbose = TRUE)Pb210CFCS(List, Breaks = NA, MonteCarloRunsCFCS = 10000, Verbose = TRUE)
List |
Dating list created by |
Breaks |
In order to be as clear as possible about the user intention, the vector must contain the following layers (section bottom depth):
|
MonteCarloRunsCFCS |
Number of Monte Carlo iterations for uncertainty. Default = 10000. |
Verbose |
Logical. If TRUE, prints progress logs to the console (default |
Updated dating list with CFCS results in $Val and uncertainties in $Unc.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
Pb210CF, AgeModel,
MissingInventory, Output.
a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CFCS (a, Verbose = FALSE, Breaks = c(0, a$Val$LayerDating), MonteCarloRunsCFCS = 100) message("CFCS years = ", paste0(round(a$Val$YearCFCS), " "))a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CFCS (a, Verbose = FALSE, Breaks = c(0, a$Val$LayerDating), MonteCarloRunsCFCS = 100) message("CFCS years = ", paste0(round(a$Val$YearCFCS), " "))
Function wrapper to run the complete workflow for a sediment core suitable for Pb dating.
This function is suitable for calculations with a well-known core,
in which the equilibrium depth is well constrained.
If run without careful core exploration,
the risk of bad results is high and it is discouraged.
Pb210Dating( FileName = NA, LayerDating = NA, Path, Verbose = TRUE, MonteCarloRunsCF = 2e+05, MonteCarloRunsCFCS = 10000 )Pb210Dating( FileName = NA, LayerDating = NA, Path, Verbose = TRUE, MonteCarloRunsCF = 2e+05, MonteCarloRunsCFCS = 10000 )
FileName |
Character. CSV file containing the sediment-core data. Default = NA uses the package example. |
LayerDating |
Numeric. Bottom depth (cm) of the dating interval. If NA (default), the equilibrium layer is selected automatically using Equilibrium(). |
Path |
Character. Directory where all PNG and CSV output files produced by the workflow (profiles plot, age model plot, results CSV) are written. Defaults to the working directory. |
Verbose |
Logical.Print progress messages. Default is |
MonteCarloRunsCF |
Number of Monte Carlo simulations of the CF model. |
MonteCarloRunsCFCS |
Number of Monte Carlo simulations of the CFCS model. |
Dating list containing all calculated variables from the CF and CFCS models.
a <- Pb210Dating(LayerDating = 17, Path = tempdir(), MonteCarloRunsCF = 10, MonteCarloRunsCFCS = 10)a <- Pb210Dating(LayerDating = 17, Path = tempdir(), MonteCarloRunsCF = 10, MonteCarloRunsCFCS = 10)
This function produces two independent PNG plots for the MassAccumulationRate (MAR)
and the SedimentAccumulationRate (SAR) of cores previously dated with
the Constant Flux (CF) model only.
It uses the per-section rates calculated by Pb210CF (not the CFCS means).
PlotMARSAR( List, Path, Verbose = TRUE, YearMin = 1900, YearMax = NA, MARMin = 0, MARMax = NA, SARMin = 0, SARMax = NA, ... )PlotMARSAR( List, Path, Verbose = TRUE, YearMin = 1900, YearMax = NA, MARMin = 0, MARMax = NA, SARMin = 0, SARMax = NA, ... )
List |
|
Path |
Character. Directory where the PNG files will be written. |
Verbose |
Logical. If TRUE, prints progress logs (default TRUE). |
YearMin |
Minimum year to be plotted. Default is |
YearMax |
Maximum year to be plotted (auto-calculated if NA). |
MARMin |
Minimum MAR to be plotted. Default is |
MARMax |
Maximum MAR to be plotted (auto-calculated if NA). |
SARMin |
Minimum SAR to be plotted. Default is |
SARMax |
Maximum SAR to be plotted (auto-calculated if NA). |
... |
Extra arguments passed to plotting functions. |
Two PNG files ('Core_MAR.png' and 'Core_SAR.png') + combined plot in Path, plus a combined plot in the active graphics device.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
# PlotMARSAR requires a List previously dated with Pb210CF() a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 1000) PlotMARSAR (a, Verbose = FALSE, Path = tempdir())# PlotMARSAR requires a List previously dated with Pb210CF() a <- ReadData (Verbose = FALSE) a <- DecayCorrection(a, Verbose = FALSE) a <- CompleteProfile(a, Verbose = FALSE) a <- Equilibrium (a, Verbose = FALSE, Interactive = FALSE) a <- Pb210CF (a, Verbose = FALSE, MonteCarloRunsCF = 1000) PlotMARSAR (a, Verbose = FALSE, Path = tempdir())
Plots sediment core profiles of any combination of total/excess/complete ,
total/excess/complete , total/complete
and one proxy (e.g. ).
The user can select which variables to plot via the PlotActivities
argument. If left NULL, the function checks the input data
and plots total values.
PlotProfiles( List, NamePlot = "Profiles", SavePNG = TRUE, Path, DepthMin = NA, DepthMax = NA, PbMax = NA, RaMax = NA, ProxyMax = NA, Proxy = FALSE, PlotActivities = NULL, Verbose = TRUE, ... )PlotProfiles( List, NamePlot = "Profiles", SavePNG = TRUE, Path, DepthMin = NA, DepthMax = NA, PbMax = NA, RaMax = NA, ProxyMax = NA, Proxy = FALSE, PlotActivities = NULL, Verbose = TRUE, ... )
List |
Dating list created by |
NamePlot |
Base name for the PNG file (default "Profiles"). |
SavePNG |
Logical. If TRUE (default), saves a high-resolution PNG file. |
Path |
Character. Directory where the PNG file will be written when
|
DepthMin |
Minimum depth to plot (cm). If NA, estimated automatically. |
DepthMax |
Maximum depth to plot (cm). If NA, estimated automatically. |
PbMax |
Axis limits when |
RaMax |
Same as above. |
ProxyMax |
Same as above. |
Proxy |
Logical. Needed when |
PlotActivities |
Character vector specifying which activities to plot on the
main (left/top) axis. Possible values:
|
Verbose |
Logical. If TRUE, prints progress logs to the console (default |
... |
Further arguments passed to graphical parameters. |
Invisibly returns NULL. Side effects: optionally creates a .png file and displays a plot.
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^210Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.
ReadData,
CompleteProfile, ConstantRa,
DecayCorrection
a <- ReadData(Verbose = FALSE) PlotProfiles(a, SavePNG = FALSE, PlotActivities = "Po210Total", Path = tempdir())a <- ReadData(Verbose = FALSE) PlotProfiles(a, SavePNG = FALSE, PlotActivities = "Po210Total", Path = tempdir())
Performs the standard preprocessing workflow required before
applying the dating models.
This function is a convenience wrapper that sequentially executes:
The objective is to generate the decay-corrected excess
profiles required by the dating models.
Depending on the radionuclide information supplied by the user:
If total activities are provided,
excess activities are calculated,
decay-corrected to the sampling date, and stored as
Pb210ExcessDecay.
If total activities are provided,
activities are first corrected for the elapsed time
between plating and measurement using the
decay constant. The resulting activities
are then decay-corrected to the sampling date using the
decay constant, assuming secular
equilibrium between and
. Excess activities are stored as
Pb210ExcessDecay.
If () is not available,
it is estimated using ConstantRa whenever possible.
Missing sections are subsequently interpolated against
cumulative dry mass depth using CompleteProfile,
generating Pb210ExcessDecayComplete.
The resulting object contains:
Pb210ExcessDecay, intended for the
Constant Flux-Constant Sedimentation (CFCS) model.
Pb210ExcessDecayComplete, intended for the
Constant Flux (CF) model.
No dating model is executed.
The user must subsequently define the dating interval through
Equilibrium or EquilibriumSet,
which are use to determine LayerDating.
Prepare4Dating(NameFile, Path, Verbose = TRUE)Prepare4Dating(NameFile, Path, Verbose = TRUE)
NameFile |
Character.
Name of the CSV file containing the sediment-core data.
If omitted or |
Path |
Character. Directory where the profiles PNG plot is written. |
Verbose |
Logical.Print progress messages. Default is |
A list containing original measurements, decay-corrected
radionuclide activities, excess activities,
and completed excess profiles.
Sanchez-Cabeza, J.A. and Ruiz-Fernandez, A.C. (2012). 210Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183–200.
ReadData, DecayCorrection, CompleteProfile,
Equilibrium, EquilibriumSet,
Pb210CFCS, Pb210CF
a <- Prepare4Dating(NA, Path = tempdir(), Verbose = FALSE) # used in dating: message("Excess decay corrected and complete Pb-210 (Bq/kg): ",a$Val$Pb210ExcessDecayComplete)a <- Prepare4Dating(NA, Path = tempdir(), Verbose = FALSE) # used in dating: message("Excess decay corrected and complete Pb-210 (Bq/kg): ",a$Val$Pb210ExcessDecayComplete)
This function serves as the primary data entry point for the pb210dating package.
It allows users to either load the built-in example dataset (TehuaII) or import
user files in CSV format. The function performs automatic cleaning of
empty rows and validates that the 21-column structure meets the requirements
for radiochronological modeling.
ReadData(NameFile = NA, Verbose = TRUE)ReadData(NameFile = NA, Verbose = TRUE)
NameFile |
Character. Path to the .csv file.
If omitted or set to NA (default),
the function will load the built-in |
Verbose |
Logical. Print progress messages (default TRUE). |
The first 21 columns of the input file must follow the required structure:
Columns 1-18 (Profiles): Sample Code, Depth Bottom (cm), Depth Uncertainty, Section Mass (g), Mass Uncertainty, Total Po-210 Activity (Bq/kg), Po-210 Uncertainty, Po plating date, Po measurement start, Po measurement end, Total Pb-210 Activity (Bq/kg), Pb-210 Uncertainty, Ra-226 Activity, Ra-226 Uncertainty, Proxy Value, Proxy Uncertainty, gamma measurement start, gamma measurement end. The column name of the Proxy column is used as the Proxy name (e.g., Cs-137).
Columns 19-21 (Metadata block, 15 rows):
Core Core name (e.g. TEHUAII).
Alpha spectrometry Analyst(s) who performed alpha spectrometry (full name or initials, e.g. LHPB).
Gamma spectrometry Analyst(s) who performed gamma spectrometry (full name or initials, e.g. LHPB).
Dating Analyst(s) responsible for the Pb dating (full name or initials, e.g. JASC).
Sampling date yyyy-mm-dd
Internal diameter (cm) and uncertainty.
Half life Pb210 (yr) and uncertainty.
Half life Po210 (yr) and uncertainty.
Validation label e.g., Cs maximum
Top layer (cm) up to where the validation point can be present.
Mean depth (cm) where the validation point is observed.
Bottom layer (cm) down to where the validation point is observed.
Year upper up to where the validation point can be present.
Mean year where the validation point is observed.
Year lower down to where the validation point is observed.
A list containing two elements:
Val |
A list of numerical variables, dates, and activities. |
Unc |
A list containing the uncertainties associated with numeric variables in 'Val'. |
Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012).
Pb sediment radiochronology: an integrated formulation and
classification of dating models.
Geochimica et Cosmochimica Acta, 82, 183-200.
DecayCorrection,
CompleteProfile, ConstantRa
# Reading the example file. a <- ReadData(Verbose = FALSE) message("Column names read: ", names(a$Val)) # Reading a named CSV file (here, the example file). f <- system.file("extdata", "TehuaII.csv", package = "pb210dating") b <- ReadData(f, Verbose = FALSE) message("Identical? ", identical(a, b))# Reading the example file. a <- ReadData(Verbose = FALSE) message("Column names read: ", names(a$Val)) # Reading a named CSV file (here, the example file). f <- system.file("extdata", "TehuaII.csv", package = "pb210dating") b <- ReadData(f, Verbose = FALSE) message("Identical? ", identical(a, b))