Learn R Programming

rbacon (version 2.3.3)

agedepth: Plot an age-depth model

Description

Plot the age-depth model of a core.

Usage

agedepth(set = get("info"), BCAD = set$BCAD, unit = "cm", d.lab = c(),
  yr.lab = c(), d.min = set$d.min, d.max = set$d.max, d.by = set$d.by,
  depths = set$depths, depths.file = FALSE, yr.min = c(), yr.max = c(),
  dark = c(), prob = set$prob, rounded = 0, d.res = 400, yr.res = 400,
  date.res = 100, grey.res = 100, rotate.axes = FALSE, rev.yr = FALSE,
  rev.d = FALSE, maxcalc = 500, height = 15, mirror = TRUE, up = TRUE,
  cutoff = 0.001, plot.range = TRUE, panels = layout(1),
  range.col = grey(0.5), range.lty = "12", mn.col = "red",
  mn.lty = "12", med.col = NA, med.lty = "12", C14.col = rgb(0, 0, 1,
  0.35), C14.border = rgb(0, 0, 1, 0.5), cal.col = rgb(0, 0.5, 0.5, 0.35),
  cal.border = rgb(0, 0.5, 0.5, 0.5), hiatus.col = grey(0.5),
  hiatus.lty = "12", greyscale = grey(seq(1, 0, length = grey.res)),
  slump.col = grey(0.8), normalise.dists = TRUE, cc = set$cc,
  title = set$core, title.location = "topleft", after = set$after,
  bty = "l", mar = c(3, 3, 1, 1), mgp = c(1.5, 0.7, 0), xaxs = "r",
  yaxs = "r", xaxt = "s", yaxt = "s", plot.pdf = FALSE,
  dates.only = FALSE, model.only = FALSE, talk = FALSE)

Arguments

set

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

BCAD

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

unit

Depth units, default unit="cm".

d.lab

The labels for the depth axis. Default d.lab="Depth (cm)". See also unit.

yr.lab

The labels for the calendar axis (default yr.lab="cal BP" or "BC/AD" if BCAD=TRUE).

d.min

Minimum depth of age-depth model (use this to extrapolate to depths higher than the top dated depth).

d.max

Maximum depth of age-depth model (use this to extrapolate to depths below the bottom dated depth).

d.by

Depth intervals at which ages are calculated. Default 1. Alternative depth intervals can be provided using, e.g., d.by=0.5.

depths

By default, Bacon will calculate the ages for the depths d.min to d.max in steps of d.by. Alternative depths can be provided as, e.g., depths=seq(0, 100, length=500) or as a file, e.g., depths=read.table("CoreDepths.txt". See also depths.file.

depths.file

By default, Bacon will calculate the ages for the depths d.min to d.max in steps of d.by. If depths.file=TRUE, Bacon will read a file containing the depths for which you require ages. This file, containing the depths in a single column without a header, should be stored within coredir, and its name should start with the core's name and end with '_depths.txt'. Then specify depths.file=TRUE (default FALSE). See also depths.

yr.min

Minimum calendar age of the age-depth plot.

yr.max

Maximum calendar age of the age-depth plot.

dark

Darkness of the greyscale age-depth model. By default, the darkest grey value is calculated as 10 times the height of the lowest-precision age estimate dark=c(). Lower values will result in lighter grey but values >1 are not allowed.

prob

Confidence interval to report (between 0 and 1, default 0.95 or 95%).

rounded

Rounding of years. Default is to round to single years.

d.res

Resolution or amount of greyscale pixels to cover the depth scale of the age-model plot. Default d.res=200.

yr.res

Resolution or amount of greyscale pixels to cover the age scale of the age-model plot. Default yr.res=200.

date.res

Date distributions are plotted using date.res=100 points by default.

grey.res

Grey-scale resolution of the age-depth model. Default grey.res=100.

rotate.axes

By default, the age-depth model is plotted with the depths on the horizontal axis and ages on the vertical axis. This can be changed with rotate.axes=TRUE.

rev.yr

The direction of the age axis, which can be reversed using rev.yr=TRUE.

rev.d

The direction of the depth axis, which can be reversed using rev.d=TRUE.

maxcalc

Number of depths to calculate ages for. If this is more than maxcalc=500, a warning will be shown that calculations will take time.

height

The maximum heights of the distributions of the dates on the plot. See also normalise.dists.

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.

cutoff

Avoid plotting very low probabilities of date distributions (default cutoff=0.001).

plot.range

Whether or not to plot the curves showing the confidence ranges of the age-model. Defaults to (plot.range=TRUE).

panels

Divide the graph panel. Defaults to 1 graph per panel, panels=layout(1). To avoid dividing into panels, use panels=c().

range.col

The colour of the curves showing the confidence ranges of the age-model. Defaults to medium grey (range.col=grey(0.5)).

range.lty

The line type of the curves showing the confidence ranges of the age-model. Defaults to range.lty=12.

mn.col

The colour of the mean age-depth model: default mn.col="red".

mn.lty

The line type of the mean age-depth model. Default mn.lty=12.

med.col

The colour of the median age-depth model: not drawn by default med.col=NA.

med.lty

The line type of the median age-depth model. Default med.lty=12.

C14.col

The colour of the calibrated ranges of the dates. Default is semi-transparent blue: C14.col=rgb(0,0,1,.35).

C14.border

The colours of the borders of calibrated 14C dates. Default is semi-transparent dark blue: C14.border=rgb(0, 0, 1, 0.5).

cal.col

The colour of the non-14C dates. Default is semi-transparent blue-green: cal.col=rgb(0,.5,.5,.35).

cal.border

The colour of the border of non-14C dates in the age-depth plot: default semi-transparent dark blue-green: cal.border=rgb(0,.5,.5,.5).

hiatus.col

The colour of the depths of any hiatuses. Default hiatus.col=grey(0.5).

hiatus.lty

The line type of the depths of any hiatuses. Default hiatus.lty=12.

greyscale

The function to produce a coloured representation of all age-models. Defaults to grey-scales: greyscale=function(x) grey(1-x).

slump.col

Colour of slumps. Defaults to slump.col=grey(0.8).

normalise.dists

By default, the distributions of more precise dates will cover less time and will thus peak higher than less precise dates. This can be avoided by specifying normalise.dists=FALSE.

cc

Calibration curve for 14C dates: cc=1 for IntCal13 (northern hemisphere terrestrial), cc=2 for Marine13 (marine), cc=3 for SHCal13 (southern hemisphere terrestrial). For dates that are already on the cal BP scale use cc=0.

title

The title of the age-depth model is plotted on the main panel. By default this is the core's name. To leave empty: title="".

title.location

Location of the title. Default title.location='topleft'.

after

Sets a short section above and below hiatus.depths within which to calculate ages. For internal calculations - do not change.

bty

Type of box to be drawn around plots ("n" for none, and "l" (default), "7", "c", "u", or "o" for correspondingly shaped boxes).

mar

Plot margins (amount of white space along edges of axes 1-4). Default mar=c(3,3,1,1).

mgp

Axis text margins (where should titles, labels and tick marks be plotted). Defaults to mgp=c(1.5, .7, .0).

xaxs

Extension of x-axis. By default, add some extra white-space at both extremes (xaxs="r"). See ?par for other options.

yaxs

Extension of y-axis. By default, add some extra white-space at both extremes (yaxs="r"). See ?par for other options.

xaxt

Whether or not to plot the x-axis. Can be used to adapt axes after a plot. See ?par for other options.

yaxt

Whether or not to plot the y-axis. Can be used to adapt axes after a plot. See ?par for other options.

plot.pdf

Produce a pdf file of the age-depth plot.

dates.only

By default, the age-depth model is plotted on top of the dates. This can be avoided by supplying dates.only=TRUE.

model.only

By default, panels showing the MCMC iterations and the priors and posteriors for accumulation rate and memory are plotted above the main age-depth model panel. This can be avoided by supplying model.only=TRUE. Note however that this removes relevant information to evaluate the age-depth model, so we do recommend to present age-models together with these upper panels.

talk

Provide a summary of the age ranges after producing the age-depth model graph; default talk=FALSE.

Value

A plot of the age-depth model, and estimated ages incl. confidence ranges for each depth.

Details

After loading a previous run, or after running either the scissors or thinner command, plot the age-model again using the command agedepth().

References

Blaauw, M. and Christen, J.A., Flexible paleoclimate age-depth models using an autoregressive gamma process. Bayesian Anal. 6 (2011), no. 3, 457--474. https://projecteuclid.org/download/pdf_1/euclid.ba/1339616472

See Also

http://www.chrono.qub.ac.uk/blaauw/manualBacon_2.3.pdf

Examples

Run this code
# NOT RUN {
  agedepth(yr.res=50)
# }
# NOT RUN {
  Bacon(ask=FALSE, coredir=tempfile())
  agedepth()
# }

Run the code above in your browser using DataLab