Learn R Programming

rice (version 1.1.1)

overlapping: 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

overlapping(
  y,
  er,
  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.001,
  age.lim = c(),
  age.lab = c(),
  calib.col = rgb(0, 0, 0, 0.2),
  overlap.col = rgb(0, 0, 1, 0.4),
  overlap.border = NA,
  overlap.height = 1,
  talk = TRUE,
  prob = 0.95,
  roundby = 1,
  bty = "n"
)

Value

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

Arguments

y

The set of radiocarbon dates

er

The lab errors of the radiocarbon dates

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.

age.lim

Calendar age limits of the calculations. Calculated automatically by default.

age.lab

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

calib.col

The colour of the individual calibrated ages. Defaults to semi-transparent grey.

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

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

Examples

Run this code
  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
  overlapping(y, er, cc=1:2) 

Run the code above in your browser using DataLab