Learn R Programming

rice (version 1.1.1)

as.bin: Combine multiple radiocarbon dates within bins

Description

Combine all calibrated dates by calculating their product for a range of calendar ages, as if all dates belonged to the same (unknown) calendar age bin.

Usage

as.bin(
  y,
  er,
  width = 100,
  move.by = c(),
  move.res = 100,
  cc = 1,
  postbomb = FALSE,
  deltaR = 0,
  deltaSTD = 0,
  is.F = FALSE,
  as.F = FALSE,
  thiscurve = NULL,
  yrsteps = 1,
  threshold = 0.001,
  normal = TRUE,
  t.a = 3,
  t.b = 4,
  BCAD = FALSE,
  cc.dir = NULL,
  age.lim = c(),
  age.lab = c(),
  d.lim = c(),
  calib.col = rgb(0, 0, 0, 0.2),
  bin.col = rgb(0, 0, 1, 0.5),
  bin.height = 0.3,
  talk = TRUE,
  prob = 0.95,
  roundby = 0,
  bty = "n"
)

Value

The number of dates that fall within the moving bins, for each bin.

Arguments

y

The set of radiocarbon dates to be tested

er

The lab errors of the radiocarbon dates

width

The bin width to apply. Narrower bins will result in fewer dates fitting those bins, but in more detailed bin width histograms.

move.by

Step size by which the window moves. Left empty by default, and then the moves are set by the parameter move.res.

move.res

The amount of steps taken to make the histogram. Defaults to move.res=100 - a compromise between detail obtained and calculation speed.

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

is.F

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

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

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

BCAD

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

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

age.lim

Limits of the age axis. Calculated automatically by default.

age.lab

Label of the age axis. Defaults to cal BP or BC/AD.

d.lim

Limits of the depth/vertical axis. Calculated automatically by default.

calib.col

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

bin.col

The colour of the combined

bin.height

The height of the combined distribution

talk

Whether or not to report the calculations made. Defaults to talk=TRUE.

prob

Probability range for highest posterior density (hpd) values. Defaults to prob=0.95.

roundby

Rounding of reported years. Defaults to 0 decimals

bty

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

Author

Maarten Blaauw

Details

This calculates the amount of calibrated dates that fall within a specific bin, and calculates these bins as moving windows over the range of calendar ages to which the radiocarbon ages calibrate.

Examples

Run this code
# \donttest{
  data(shroud)
  shroudbin <- as.bin(shroud$y, shroud$er, 50, 10) 
  # bins of 50 yr, moving by 10 yr, slow
# }

Run the code above in your browser using DataLab