Learn R Programming

rbacon (version 3.3.1)

accrates.core: Provide a summary of the estimated accumulation rates for a range of core depths

Description

Obtain a summary (95% range, 68% range, median, mean) of the accumulation rates (in years per cm, so actually sedimentation times) as estimated by the MCMC iterations for a range of depths of a core, and optionally write this as a file to the core directory (ending in '_accrates.txt').

Usage

accrates.core(
  dseq = c(),
  set = get("info"),
  cmyr = FALSE,
  na.rm = FALSE,
  probs = c(0.025, 0.16, 0.84, 0.975, 0.5),
  round = 2,
  write = TRUE,
  sep = "\t"
)

Value

A summary of the estimated accumulation rate for all selected depths: minimum of the 95% interval, minimum of the 68% interval, maximum of the 68% interval, maximum of the 95% interval, median (i.e., 50%) and mean. This is optionally written to a file in the core directory.

Arguments

dseq

The sequence of depths for which accumulation rates need to be returned. Defaults to whatever info$dseq is, which most often is a sequence from the top to the bottom of the core at 1 cm increments.

set

Detailed information of the current run, stored within this session's memory as variable info.

cmyr

Accumulation rates can be calculated in cm/year or year/cm. By default cmyr=FALSE and accumulation rates are calculated in year per cm.

na.rm

Remove NA entries. These are NOT removed by default, so that always the same amount of iterations is returned.

probs

The probability ranges to be returned. Defaults to the minima and maxima of the 95% and 68% ranges, as well as the median: probs=c(.025, .16, .84, .975, .5).

round

The number of decimals to report. Defaults to round=2.

write

Whether or not to write the summary to a file, in the core's directory and ending in `_accrates.txt`.

sep

Character to separate the entries within the file. Defaults to a tab, sep="\t".

Author

Maarten Blaauw

Examples

Run this code
if (FALSE) {
  Bacon(run=FALSE, coredir=tempfile())
  agedepth(yr.res=50, d.res=50, d.by=10)
  myaccrates <- accrates.core()
}

Run the code above in your browser using DataLab