Package {pb210dating}


Type: Package
Title: Pb-210 Dating of Sediment Cores
Version: 1.0.1
Date: 2026-08-01
Encoding: UTF-8
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.
Depends: R (≥ 4.3)
Imports: lubridate
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2026-08-19 20:46:14 UTC; jasc2
Author: 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 <jasanchez@cmarl.unam.mx>
Repository: CRAN
Date/Publication: 2026-08-21 13:30:02 UTC

Pb-210 dating of sediment cores

Description

The pb210dating package provides a comprehensive toolset to date sediment cores using the classical ^{210}Pb models: the Constant Flux (CF) and the Constant Flux Constant Sedimentation (CFCS) models.

It includes functions for data import, decay correction, supported activity (^{226}Ra) calculation, equilibrium estimation, Monte Carlo uncertainty propagation, visualization, and export of results.

Details

This package follows the nomenclature and formulations of Sanchez-Cabeza and Ruiz-Fernandez (2012) and the Monte Carlo approach described in Sanchez-Cabeza et al. (2014).

Input: The package uses a single CSV file with a strict 21-column structure (see ReadData for details). The file contains:

The dating object: All functions work by progressively updating a List object containing two sub-lists:

Recommended workflows:

CF Model:

  1. ReadData

  2. DecayCorrection (if needed)

  3. CompleteProfile (optional)

  4. Equilibrium or EquilibriumSet

  5. Pb210CF

  6. AgeModel and PlotMARSAR

  7. Output

CFCS Model:

  1. ReadData

  2. DecayCorrection (if needed)

  3. Pb210CFCS (with Breaks)

  4. AgeModel

  5. Output

The function Prepare4Dating performs the standard preprocessing workflow required before applying the ^{210}Pb dating models. It is a convenience wrapper that sequentially executes ReadData, DecayCorrection, and CompleteProfile.

The function Pb210Dating is a convenience wrapper to run the complete workflow for a sediment core suitable for 210Pb dating. This function could be used with a well-known core, in which the equilibrium depth is well constrained.

Author(s)

References

Sanchez-Cabeza, J. A., & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

Sanchez-Cabeza, J. A., Ruiz-Fernández, A. C., Ontiveros-Cuadras, J. F., Bernal, L. H. P., & Olid, C. (2014). Monte Carlo uncertainty calculation of ^{210}Pb chronologies and accumulation rates of sediments and peat bogs. Quaternary Geochronology, 23, 80-93.

See Also

ReadData, Pb210CF, Pb210CFCS, AgeModel

Examples


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)
a <- Pb210CFCS      (a, Verbose = FALSE, MonteCarloRunsCFCS = 1000)
AgeModel            (a, Verbose = FALSE, SavePNG = FALSE)
Output              (a, Verbose = FALSE, Path = tempdir())


Pb-210 age model and validation

Description

This function plots the age model after ^{210}Pb dating and, if provided, the validation information (e.g., independent chronological markers). It also provides the statistical significance of the validation.

Usage

AgeModel(
  List,
  SavePNG = TRUE,
  Path,
  PlotName = "Age_Model",
  DepthMin = NA,
  DepthMax = NA,
  TimeMin = 1900,
  TimeMax = NA,
  Verbose = TRUE,
  ...
)

Arguments

List

Dating object, created by ReadData and transformed with the package functions.

SavePNG

Logical. Only if TRUE, saves a high-resolution PNG file.

Path

Character. Directory where the PNG file will be written when SavePNG = TRUE. Defaults to the working directory.

PlotName

Name of the plot (without extension) to be produced. The extension will automatically be set to .PNG. Default is "Age_Model".

DepthMin

Minimum depth (cm) of the age model plot. Default is NA.

DepthMax

Maximum depth (cm) of the age model plot. Default is NA.

TimeMin

Minimum time (decimal age) of the age model plot. Default is 1900.

TimeMax

Maximum time (decimal age) of the age model plot. Default is NA.

Verbose

Logical. If TRUE, prints progress logs to the console.

...

Extra arguments passed to plotting functions (e.g., par).

Details

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-\sigma (68%, red) and 2-\sigma (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.

Value

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).

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

Pb210CF, Pb210CFCS

Examples


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)


Complete missing data of core profiles for using the CF model.

Description

The function completes missing values in sediment core profiles used for ^{210}Pb radiochronology. Only interpolation (not extrapolation) is performed. It leaves original data intact.

Usage

CompleteProfile(List, Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by other package functions.

Verbose

Logical.Print progress messages. Default is TRUE.

Details

Required surface values: MassSection and Pb210ExcessDecay. Ra226 is optional. If no ^{226}Ra data is provided, it is skipped with a warning.

Interpolation rules:

Value

Updated dating list with complete profiles.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

Pb210CF.

Examples


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), " "))


Constant Ra-226 activity

Description

If no ^{226}Ra values are available, this function estimates a constant supported (base) ^{210}Pb activity from the bottom-most ^{210}Po or ^{210}Pb total activities.

Usage

ConstantRa(List, Mode = "auto", Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by other package functions.

Mode

Character. Total activity used to determine the constant Ra-226 activity.: "auto" (default), "Pb" or "Po". If both ^{210}Pb and ^{210}Po are present, the user must specify which one to use.

Verbose

Logical. Shows estimation details (default TRUE).

Details

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.

Value

Updated dating list with constant ^{226}Ra and its uncertainty.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

ReadData, DecayCorrection, Equilibrium, EquilibriumSet

Examples


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]))


Radioactive decay correction of Pb-210 and Po-210 to sampling date

Description

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 ^{226}Ra is present (or missing where Pb/Po data exist) it interpolates linearly in depth only the needed positions.

Correction rules for ^{210}Pb_{ex} (the activity that will be used for dating):

Uncertainties are scaled by the same correction factor(s). The function works whether the core file contains only gamma, only alpha, or both datasets.

Usage

DecayCorrection(List, Verbose = TRUE)

Arguments

List

Dating list returned by ReadData.

Verbose

Logical. Print progress messages (default TRUE).

Value

Updated dating list with Decay, Excess, and ExcessDecay fields in $Val and $Unc.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

ReadData.

Examples


a <- ReadData          (Verbose = FALSE)
a <- DecayCorrection(a, Verbose = FALSE)
message("Decay corrected values (Bq/kg): ", paste0(round(a$Val$Pb210ExcessDecay), " "))


Calculate the bottom layer with no excess Pb-210 below

Description

Estimates the layer below which there is no measurable excess ^{210}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.

Usage

Equilibrium(List, Interactive = TRUE, Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by other package functions.

Interactive

Logical. If TRUE (default), allows interactive visual selection of the equilibrium layer (highly recommended). If FALSE, it uses the automatic rule.

Verbose

Logical. If TRUE, prints progress logs to the console (default TRUE).

Details

Excess ^{210}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.

Value

Updated dating list with the value of Val$LayerDating.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

ConstantRa, EquilibriumSet, MissingInventory, Pb210CF, Pb210CFCS

Examples


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 set the equilibrium layer for Pb-210 dating

Description

Manually assigns the deepest layer below which there is no measurable excess ^{210}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.

Usage

EquilibriumSet(List, LayerDating, Verbose = TRUE)

Arguments

List

Dating list created by ReadData.

LayerDating

Numeric. Bottom depth (cm) of the equilibrium layer. It must be one of the values present in Val$DepthLayerBottom.

Verbose

Logical. If TRUE, prints progress logs to the console (default TRUE).

Details

The function performs a strict validation: LayerDating must match exactly one of the section bottom depths. No interpolation or nearest-neighbour matching is done.

Value

Updated dating list with the value of LayerDating stored in $Val$LayerDating.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

ConstantRa, Equilibrium, MissingInventory, Pb210CF, Pb210CFCS

Examples

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.")


Isotope label expression for plot axes and titles

Description

Generates a plotmath expression that renders a radionuclide symbol with the mass number as a superscript immediately preceding the element symbol (e.g. ^{137}Cs, ^{210}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.

Usage

IsotopeLabel(x, suffix = NULL, units = NULL)

Arguments

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 c(mass, element) may be supplied, e.g. c("239,240", "Pu").

"137Cs"

Mass number immediately followed by element symbol.

"Cs137", "Cs-137"

Element symbol before mass number, optionally separated by a hyphen.

"239,240Pu"

Comma-separated mass numbers for combined isotopes sharing one element symbol (e.g. ^{239,240}Pu).

"239+240Pu", "239-240Pu"

Plus- or hyphen-separated mass numbers; both are normalised to a comma in the rendered label.

suffix

An optional character string appended immediately after the element symbol. Three formats are recognised:

"_{ex}"

Renders as a plotmath subscript: ^{210}Pb_{ex}.

"^{*}"

Renders as a plotmath superscript after the symbol: ^{210}Pb"^{*}".

any other string

Rendered in parentheses: ^{210}Pb(total).

Default NULL (no suffix).

units

An optional plotmath string appended after the isotope label, separated by a thin space (~). Standard plotmath syntax applies: use ~ for spaces and ^{-1} for negative exponents, e.g. "Bq~kg^{-1}". Default NULL (no units).

Value

A parsed expression object of length 1, suitable for direct use wherever R's plotmath rendering is needed.

See Also

IsotopeLegend for legend entries; plotmath for the full plotmath syntax reference.


Isotope label expressions for plot legends

Description

Generates a single expression object of length n containing one typeset radionuclide label per entry, suitable for direct use as the legend argument of legend.

Usage

IsotopeLegend(isotopes, suffix = NULL, units = NULL)

Arguments

isotopes

A character vector of isotope strings in any format accepted by IsotopeLabel.

suffix

A character vector of suffix strings (recycled). See the suffix argument of IsotopeLabel for recognised formats. Default NULL (no suffix for any entry).

units

A character vector of plotmath unit strings (recycled). Default NULL (no units for any entry).

Details

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.

Value

A parsed expression object of length length(isotopes), ready to be passed as legend = in a call to legend.

See Also

IsotopeLabel for single labels on axes and titles.


Calculate missing inventory using a reference depth or sediment accumulation rate

Description

In a sediment core dated with the Pb210CF model, equilibrium may not be reached at the core bottom. This function estimates the missing ^{210}Pb_{ex} inventory (below the deepest layer) so that the Constant Flux (CF) model can be applied.

Three estimation modes are available:

At the end, the function re-runs Pb210CF(List) with the updated MissingInventoryBottom (or MissingInventoryTop) to provide consistent ages and accumulation rates.

Usage

MissingInventory(
  List,
  Mode = "reference_date",
  ValidationNumber = 1,
  Bottom_n = 3,
  MonteCarloRunsCF = 2e+05,
  Verbose = TRUE
)

Arguments

List

Dating list returned by ReadData (can be raw or already processed by Pb210CF).

Mode

Character. One of reference_date (default), mean_mar, or fitted_mar. Partial matching is supported (e.g. ref, dat, mea, fit).

ValidationNumber

Integer. Which validation point (row in the validation table) to use when Mode = "reference_date". Ignored for the other modes. Default is 1.

Bottom_n

Integer. Number of deepest dated sections to use for MAR calculation when Mode = "mean_mar" or "fitted_mar". Must be \ge 1 for "mean_mar" and \ge 2 for "fitted_mar". Default is 3.

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).

Value

Updated dating list with the missing inventory in Val$MissingInventoryBottom (or Val$MissingInventoryTop) and the estimated Monte Carlo uncertainty in the corresponding Unc$ entry.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

Equilibrium, Pb210CF, Pb210CFCS

Examples

 

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))


Output merged Pb-210 dating results (CF + CFCS) in a single CSV file

Description

Creates one single CSV file with per-section data in and core-wide constants in the last four columns ('Name', 'Value', 'Uncertainty', 'p-value').

Usage

Output(List, Path, Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by Pb210CF and/or Pb210CFCS.

Path

Character. Directory where the output files will be written.

Verbose

Logical.Print progress messages. Default is TRUE.

Value

Invisibly returns the final data.frame. Side effect: writes "<CoreName>_results.csv" and "<CoreName>.out" in Path.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

ReadData, Pb210CF, Pb210CFCS, MissingInventory.

Examples


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)


Pb-210 dating of sediment cores with the Constant Flux (CF) model

Description

Performs ^{210}Pb dating using the Constant Flux (CF) model. Based on Sanchez-Cabeza and Ruiz-Fernandez (2012).

Usage

Pb210CF(List, MonteCarloRunsCF = 2e+05, Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by other package functions.

MonteCarloRunsCF

Number of Monte Carlo iterations for uncertainty estimation. Default is 2E5. Use MonteCarloRunsCF = 0 to skip uncertainty calculation.

Verbose

Logical.Print progress messages. Default is TRUE.

Details

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).

Value

Updated dating list. Results in $Val, uncertainties in $Unc.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

CompleteProfile, Pb210CFCS, AgeModel, Equilibrium, EquilibriumSet, MissingInventory, Output, PlotMARSAR.

Examples


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),  " "))


Pb-210 dating of sediment cores with the CFCS model

Description

Performs ^{210}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 ^{210}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.

Usage

Pb210CFCS(List, Breaks = NA, MonteCarloRunsCFCS = 10000, Verbose = TRUE)

Arguments

List

Dating list created by ReadData and processed by other package functions.

Breaks

In order to be as clear as possible about the user intention, the vector must contain the following layers (section bottom depth):

  • The surface layer (0).

  • The following intermediate break points (if any).

  • The depth until which fitting will take place. Its maximum value is the layer down to which excess ^{210}Pb is observed. It can be last break point. The minimum number of elements of Breaks is 2, corresponding to the surface layer and the end of the segment to be used for CFCS fitting.

MonteCarloRunsCFCS

Number of Monte Carlo iterations for uncertainty. Default = 10000.

Verbose

Logical. If TRUE, prints progress logs to the console (default TRUE).

Value

Updated dating list with CFCS results in $Val and uncertainties in $Unc.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

Pb210CF, AgeModel, MissingInventory, Output.

Examples


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),  " "))


Complete Pb-210 dating workflow

Description

Function wrapper to run the complete workflow for a sediment core suitable for ^{210}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.

Usage

Pb210Dating(
  FileName = NA,
  LayerDating = NA,
  Path,
  Verbose = TRUE,
  MonteCarloRunsCF = 2e+05,
  MonteCarloRunsCFCS = 10000
)

Arguments

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 TRUE.

MonteCarloRunsCF

Number of Monte Carlo simulations of the CF model.

MonteCarloRunsCFCS

Number of Monte Carlo simulations of the CFCS model.

Value

Dating list containing all calculated variables from the CF and CFCS models.

Examples


a <- Pb210Dating(LayerDating = 17, Path = tempdir(),  
                 MonteCarloRunsCF = 10, MonteCarloRunsCFCS = 10)


Plots accumulation rates of sediment cores dated with the CF model

Description

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).

Usage

PlotMARSAR(
  List,
  Path,
  Verbose = TRUE,
  YearMin = 1900,
  YearMax = NA,
  MARMin = 0,
  MARMax = NA,
  SARMin = 0,
  SARMax = NA,
  ...
)

Arguments

List

Dating object, created by ReadData and dated with Pb210CF.

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 1900.

YearMax

Maximum year to be plotted (auto-calculated if NA).

MARMin

Minimum MAR to be plotted. Default is 0.

MARMax

Maximum MAR to be plotted (auto-calculated if NA).

SARMin

Minimum SAR to be plotted. Default is 0.

SARMax

Maximum SAR to be plotted (auto-calculated if NA).

...

Extra arguments passed to plotting functions.

Value

Two PNG files ('Core_MAR.png' and 'Core_SAR.png') + combined plot in Path, plus a combined plot in the active graphics device.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

Pb210CF.

Examples


# 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())


Plot of sediment profiles: flexible selection of Pb-210, Po-210, Ra-226 and proxy

Description

Plots sediment core profiles of any combination of total/excess/complete ^{210}Pb, total/excess/complete ^{210}Po, total/complete ^{226}Ra and one proxy (e.g. ^{137}Cs). 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.

Usage

PlotProfiles(
  List,
  NamePlot = "Profiles",
  SavePNG = TRUE,
  Path,
  DepthMin = NA,
  DepthMax = NA,
  PbMax = NA,
  RaMax = NA,
  ProxyMax = NA,
  Proxy = FALSE,
  PlotActivities = NULL,
  Verbose = TRUE,
  ...
)

Arguments

List

Dating list created by ReadData and processed by other package functions.

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 SavePNG = TRUE.

DepthMin

Minimum depth to plot (cm). If NA, estimated automatically.

DepthMax

Maximum depth to plot (cm). If NA, estimated automatically.

PbMax

Axis limits when PlotActivities = NULL). If not NULL, axis limit is computed automatically from the selected radionuclides.

RaMax

Same as above.

ProxyMax

Same as above.

Proxy

Logical. Needed when PlotActivities = NULL).

PlotActivities

Character vector specifying which activities to plot on the main (left/top) axis. Possible values: "Pb210Total", "Pb210Excess", "Pb210ExcessDecay}, \code{"Pb210ExcessDecayComplete (this is the one used for dating), "Po210Total", "Po210Excess}, \code{"Po210ExcessDecay, "Po210ExcessDecayComplete}, \code{"Ra226, "Ra226Complete}, \code{"Proxy"}. The argument is \strong{case-insensitive} (e.g. "pb210excess", "PB210EXCESS", or "Pb210Excess" all work). Default \code{NULL} automatically identifies and plots \code{"Pb210Total"}, \code{"Po210Total"} and \code{"Ra226.

Verbose

Logical. If TRUE, prints progress logs to the console (default TRUE).

...

Further arguments passed to graphical parameters.

Value

Invisibly returns NULL. Side effects: optionally creates a .png file and displays a plot.

References

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.

See Also

ReadData, CompleteProfile, ConstantRa, DecayCorrection

Examples


a <- ReadData(Verbose = FALSE) 
PlotProfiles(a, SavePNG = FALSE, PlotActivities = "Po210Total", Path = tempdir())


Prepare sediment-core data for Pb-210 dating

Description

Performs the standard preprocessing workflow required before applying the ^{210}Pb dating models.

This function is a convenience wrapper that sequentially executes:

  1. ReadData

  2. DecayCorrection

  3. CompleteProfile

The objective is to generate the decay-corrected excess ^{210}Pb profiles required by the dating models.

Depending on the radionuclide information supplied by the user:

Missing sections are subsequently interpolated against cumulative dry mass depth using CompleteProfile, generating Pb210ExcessDecayComplete.

The resulting object contains:

No dating model is executed. The user must subsequently define the dating interval through Equilibrium or EquilibriumSet, which are use to determine LayerDating.

Usage

Prepare4Dating(NameFile, Path, Verbose = TRUE)

Arguments

NameFile

Character. Name of the CSV file containing the sediment-core data. If omitted or NA, the example dataset included in the package is used.

Path

Character. Directory where the profiles PNG plot is written.

Verbose

Logical.Print progress messages. Default is TRUE.

Value

A list containing original measurements, decay-corrected radionuclide activities, excess ^{210}Pb activities, and completed excess ^{210}Pb profiles.

References

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.

See Also

ReadData, DecayCorrection, CompleteProfile, Equilibrium, EquilibriumSet, Pb210CFCS, Pb210CF

Examples


a <- Prepare4Dating(NA, Path = tempdir(), Verbose = FALSE)
# used in dating: 
message("Excess decay corrected and complete Pb-210 (Bq/kg): ",a$Val$Pb210ExcessDecayComplete)


Read Data for Pb-210 Dating of Sediment Cores

Description

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.

Usage

ReadData(NameFile = NA, Verbose = TRUE)

Arguments

NameFile

Character. Path to the .csv file. If omitted or set to NA (default), the function will load the built-in TehuaII dataset from the package.

Verbose

Logical. Print progress messages (default TRUE).

Details

The first 21 columns of the input file must follow the required structure:

Value

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'.

References

Sanchez-Cabeza, J. A. & Ruiz-Fernandez, A. C. (2012). ^{210}Pb sediment radiochronology: an integrated formulation and classification of dating models. Geochimica et Cosmochimica Acta, 82, 183-200.

See Also

DecayCorrection, CompleteProfile, ConstantRa

Examples


# 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))