add.dates: Add dates to age-depth plots

View source: R/plots.R

add.datesR Documentation

Add dates to age-depth plots

Description

Add dated depths to plots, e.g. to show dates that weren't used in the age-depth model

Usage

add.dates(
  mn,
  sdev,
  depth,
  cc = 1,
  above = 0.001,
  exx = 50,
  normal = TRUE,
  normalise = TRUE,
  t.a = 3,
  t.b = 4,
  age.res = 100,
  times = 20,
  col = rgb(1, 0, 0, 0.5),
  border = rgb(1, 0, 0, 0.5),
  rotate.axes = FALSE,
  mirror = TRUE,
  up = TRUE,
  BCAD = FALSE
)

Arguments

mn

Reported mean of the date. Can be multiple dates.

sdev

Reported error of the date. Can be multiple dates.

depth

Depth of the date.

cc

The calibration curve to use: cc=1 for IntCal20 (northern hemisphere terrestrial), cc=2 for Marine20 (marine), cc=3 for SHcal20 (southern hemisphere terrestrial), cc=0 for none (dates that are already on the cal BP scale).

above

Threshold for plotting of probability values. Defaults to above=1e-3.

exx

Exaggeration of probability distribution plots. Defaults to exx=50.

normal

By default, Bacon uses the student's t-distribution to treat the dates. Use normal=TRUE to use the normal/Gaussian distribution. This will generally give higher weight to the dates.

normalise

By default, the date is normalised to an area of 1 (normalise=TRUE).

t.a

The dates are treated using the student's t distribution by default (normal=FALSE). The student's t-distribution has two parameters, t.a and t.b, set at 3 and 4 by default (see Christen and Perez, 2010). If you want to assign narrower error distributions (more closely resembling the normal distribution), set t.a and t.b at for example 33 and 34 respectively (e.g., for specific dates in your .csv file). For symmetry reasons, t.a must always be equal to t.b-1.

t.b

The dates are treated using the student's t distribution by default (normal=FALSE). The student's t-distribution has two parameters, t.a and t.b, set at 3 and 4 by default (see Christen and Perez, 2010). If you want to assign narrower error distributions (more closely resembling the normal distribution), set t.a and t.b at for example 33 and 34 respectively (e.g., for specific dates in your .csv file). For symmetry reasons, t.a must always be equal to t.b-1.

age.res

Resolution of the date's distribution. Defaults to date.res=100.

times

The extent of the range to be calculated for each date. Defaults to times=20.

col

The colour of the ranges of the date. Default is semi-transparent red: col=rgb(1,0,0,.5).

border

The colours of the borders of the date. Default is semi-transparent red: border=rgb(1,0,0,0.5).

rotate.axes

The default of plotting age on the horizontal axis and event probability on the vertical one can be changed with rotate.axes=TRUE.

mirror

Plot the dates as 'blobs'. Set to mirror=FALSE to plot simple distributions.

up

Directions of distributions if they are plotted non-mirrored. Default up=TRUE.

BCAD

The calendar scale of graphs is in cal BP by default, but can be changed to BC/AD using BCAD=TRUE.

Details

Sometimes it is useful to add additional dating information to age-depth plots, e.g., to show outliers or how dates calibrate with different estimated offsets.

Value

A date's distribution, added to an age-depth plot.

Author(s)

Maarten Blaauw, J. Andres Christen

Examples

  clam(coredir=tempfile())
  add.dates(5000, 100, 60)

clam documentation built on Aug. 17, 2022, 5:06 p.m.