Learn R Programming

rbacon (version 3.3.1)

stretch: Stretch some depths of a core

Description

Stretch squeezed depths e.g., calculate the original depths of depths that were squeezed. Accompanies the squeeze function.

Usage

stretch(d, boundary, times)

Value

The stretched depth(s)

Arguments

d

The depth(s) to be stretched

boundary

The depth below which depths should be stretched

times

The factor by which the depths should be stretched

Author

Maarten Blaauw

Examples

Run this code
  stretch(25.75,25,20)
if (FALSE) {
  # To play the accordion, first squeeze an existing core.
  # Let's squeeze the depths below 10 cm core depth 20 times:
  Bacon("accordion", 1)
  dets <- info$dets
  dets[,4] <- squeeze(dets[,4], 10, 20)

  # make a new directory for the squeezed core, and place the dets file there:
  dir.create("Bacon_runs/squeezed")
  write.table(dets, "Bacon_runs/squeezed/squeezed.csv", row.names=FALSE, sep=",")

  # now run that squeezed core, adding a boundary (10cm) and adapting the acc.mean prior (20x):
  Bacon("squeezed", 1, boundary=10, acc.mean=c(5, 20*5))
  # finally, plot while stretching the depths onto the original scale:
  agedepth(accordion=c(10,20))
}

Run the code above in your browser using DataLab