Learn R Programming

rice (version 1.1.1)

spread: The spread among calibrated dates

Description

Calculates the spread among multiple calibrated radiocarbon dates. It does this by randomly sampling ages from the calibrated dates, and calculating the difference between one random date and all others for that iteration.

Usage

spread(
  y,
  er,
  n = 1e+05,
  cc = 1,
  postbomb = FALSE,
  deltaR = 0,
  deltaSTD = 0,
  as.F = FALSE,
  thiscurve = NULL,
  yrsteps = 1,
  cc.resample = FALSE,
  threshold = 0.001,
  normal = TRUE,
  t.a = 3,
  t.b = 4,
  cc.dir = NULL,
  visualise = TRUE,
  talk = TRUE,
  prob = 0.95,
  roundby = 1,
  bty = "l"
)

Value

The spread of all calibrated probabilities.

Arguments

y

The set of radiocarbon dates

er

The lab errors of the radiocarbon dates

n

The number of iterations to base the calculations on. Defaults to 100,000. Different values for n could significantly alter performance and accuracy.

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

as.F

Whether or not to calculate ages in the F14C realm. Defaults to as.F=FALSE, which uses the C14 realm.

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

yrsteps

Steps to use for interpolation. Defaults to the cal BP steps in the calibration curve

cc.resample

The IntCal20 curves have different densities (every year between 0 and 5 kcal BP, then every 5 yr up to 15 kcal BP, then every 10 yr up to 25 kcal BP, and then every 20 yr up to 55 kcal BP). If calibrated ages span these density ranges, their drawn heights can differ, as can their total areas (which should ideally all sum to the same size). To account for this, resample to a constant time-span, using, e.g., cc.resample=5 for 5-yr timespans.

threshold

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

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

visualise

Whether or not to plot the spread

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

Examples

Run this code
  data(shroud)
  spread(shroud$y,shroud$er)
  Zu <- grep("ETH", shroud$ID) # Zurich lab only
  spread(shroud$y[Zu],shroud$er[Zu])

Run the code above in your browser using DataLab