overlap: The overlap between calibrated C14 dates

View source: R/sets.R

overlapR Documentation

The overlap between calibrated C14 dates

Description

Calculates the amount of overlap (as percentage) between two or more calibrated radiocarbon dates. It does this by taking a sequence of calendar dates 'x' and for each calendar date find the calibrated distribution with the minimum height - this minimum height is taken as the overlap between the dates for that age. This is repeated for all 'x'. The sum of these heights is the overlap, which can reach values from 0 to 100%.

Usage

overlap(
  y,
  er = c(),
  labels = c(),
  is.F = FALSE,
  res = 1000,
  cc = 1,
  postbomb = FALSE,
  deltaR = 0,
  deltaSTD = 0,
  thiscurve = NULL,
  BCAD = FALSE,
  normal = TRUE,
  t.a = 3,
  t.b = 4,
  cc.dir = NULL,
  threshold = 0,
  xlim = c(),
  xlab = c(),
  yrby = 1,
  dist.col = rgb(0, 0, 0, 0.2),
  overlap.col = rgb(0, 0, 1, 0.4),
  overlap.border = NA,
  overlap.height = 1,
  talk = TRUE,
  visualise = TRUE,
  prob = 0.95,
  roundby = 1,
  bty = "n",
  yaxt = "n"
)

Arguments

y

The set of radiocarbon dates. Alternatively, existing distributions can be provided as a list of distributions, e.g. already-calibrated distributions or distributions derived from age-model estimates.

er

The lab errors of the radiocarbon dates

labels

Labels to be printed for the distributions (optional).

is.F

Set this to TRUE if the provided age and error are in the F14C realm.

res

The resolution to base the calculations on. Defaults to 1000 steps between the minimum and maximum cal BP (these are calculated from the total calendar age range of all calibrated distributions).

cc

Calibration curve to use. Defaults to IntCal20 (cc=1).

postbomb

Whether or not to use a postbomb curve. Required for negative radiocarbon ages.

deltaR

Age offset (e.g. for marine samples).

deltaSTD

Uncertainty of the age offset (1 standard deviation).

thiscurve

As an alternative to providing cc and/or postbomb, the data of a specific curve can be provided (3 columns: cal BP, C14 age, error).

BCAD

Which calendar scale to use. Defaults to cal BP, BCAD=FALSE.

normal

Use the normal distribution to calibrate dates (default TRUE). The alternative is to use the t model (Christen and Perez 2016).

t.a

Value a of the t distribution (defaults to 3).

t.b

Value b of the t distribution (defaults to 4).

cc.dir

Directory of the calibration curves. Defaults to where the package's files are stored (system.file), but can be set to, e.g., cc.dir="curves".

threshold

Report only values above a threshold. Defaults to threshold=1e-6.

xlim

Age limits of the x-axis. Calculated automatically by default.

xlab

Label of the calendar age, defaults to BCAD or cal BP.

yrby

Resolution in years. Defaults to by=1.

dist.col

The colour of the individual (calibrated) distributions. Defaults to semi-transparent grey. Different colours can also be provided for the individual distributions.

overlap.col

The colour of the overlap distribution.

overlap.border

The colour of the border of the overlap distribution.

overlap.height

The height of the overlap distribution.

talk

Whether or not to report a summary of the spread.

visualise

Whether or not to plot the individual distributions and the overlap.

prob

Probability range to report. Defaults to prob=0.95.

roundby

Number of decimals to report.

bty

Draw a box around a box of a certain shape. Defaults to bty="n".

yaxt

Type of y-axis. Defaults to none drawn (yaxt="n").

Value

The overlap between all calibrated probabilities as percentage, and a plot.

Examples

  y <- c(3820, 4430) # the C14 ages of a twig and a marine shell from a single layer
  er <- c(40, 40) # their lab errors
  overlap(y, er, cc=1:2, dist.col=3:4, labels=c("twig", "shell"))
  mydists <- list(caldist(130,20, cc=1), caldist(150,20, cc=0))
  overlap(mydists)

rice documentation built on June 13, 2025, 5:09 p.m.