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",
  postbomb1 = FALSE,
  postbomb2 = FALSE,
  as.F = FALSE,
  name = "mixed.14C",
  cc.dir = c(),
  thiscurve1 = c(),
  thiscurve2 = c(),
  save = FALSE,
  offset = cbind(0, 0),
  round = c(),
  sep = " ",
  decimals = 8
)

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.

postbomb1

Option to provide a postbomb curve for the first curve (defaults to FALSE).

postbomb2

Option to provide a postbomb curve for the second curve (defaults to FALSE).

as.F

The curves can be returned as F14C values instead of the default C14. Make sure that if as.F=TRUE and you are using thiscurve1 and/or thiscurve2, that these curves are in F14C space already.

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

thiscurve1

As an alternative to using curves that come with the package, a tailor-made curve can be provided for the first curve (as three columns: cal BP, C14 age, error).

thiscurve2

As an alternative to using curves that come with the package, a tailor-made curve can be provided for the second curve (as three columns: cal BP, C14 age, error).

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), e.g. offset=cbind(100,0)

round

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

sep

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

decimals

Number of decimals to report when as.F=TRUE. Defaults to 8.

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()
new.ccdir(tmpdir)
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 April 13, 2025, 8:50 p.m.