stretch: Stretch some depths of a core

View source: R/calc.R

stretchR Documentation

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)

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

Value

The stretched depth(s)

Author(s)

Maarten Blaauw

Examples

  stretch(25.75,25,20)
## Not run: 
  # 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))

## End(Not run)

rbacon documentation built on July 26, 2023, 5:35 p.m.