mix.ccurves: Build a custom-made, mixed calibration curve.

View source: R/rintcal.R

mix.ccurvesR Documentation

Build a custom-made, mixed calibration curve.

Description

If two curves need to be ‘mixed’ to calibrate, e.g. for dates of mixed terrestrial and marine carbon sources, then this function can be used. The curve will be returned invisibly, or saved in a temporary directory together with the main calibration curves. This temporary directory then has to be specified in further commands, e.g. for rbacon: Bacon(, cc.dir=tmpdr) (see examples). It is advisable to make your own curves folder and have cc.dir point to that folder.

Usage

mix.ccurves(
  proportion = 0.5,
  cc1 = "IntCal20",
  cc2 = "Marine20",
  name = "mixed.14C",
  cc.dir = c(),
  save = FALSE,
  offset = cbind(0, 0),
  round = c(),
  sep = " "
)

Arguments

proportion

Proportion of the first calibration curve required. e.g., change to proportion=0.7 if cc1 should contribute 70% (and cc2 30%) to the mixed curve.

cc1

The first calibration curve to be mixed. Defaults to the northern hemisphere terrestrial curve IntCal20.

cc2

The second calibration curve to be mixed. Defaults to the marine curve IntCal20.

name

Name of the new calibration curve.

cc.dir

Name of the directory where to save the file. Since R does not allow automatic saving of files, this points to a temporary directory by default. Adapt to your own folder, e.g., cc.dir="~/ccurves" or in your current working directory, cc.dir=".".

save

Save the curve in the folder specified by dir. Defaults to FALSE.

offset

Any offset and error to be applied to cc2 (default 0 +- 0). Entered as two columns (possibly of just one row).

round

The entries can be rounded to a specified amount of decimals. Defaults to no rounding.

sep

Separator between fields (tab by default, "\t")

Details

The proportional contribution of each of both calibration curves has to be set.

Value

A file containing the custom-made calibration curve, based on calibration curves cc1 and cc2.

Examples

tmpdir <- tempdir()
mix.ccurves(cc.dir=tmpdir)
# now assume the offset is constant but its uncertainty increases over time:
cc <- ccurve()
offset <- cbind(rep(100, nrow(cc)),  seq(0, 1e3, length=nrow(cc)))
# clean up:
unlink(tmpdir)

Maarten14C/IntCal documentation built on Oct. 11, 2023, 1:25 a.m.