age_depth_interpolate: Age-depth model interpolators/extrapolators

Description Usage Arguments Value Examples

View source: R/age_depth_model.R

Description

Age-depth model interpolators/extrapolators

Usage

1
2
3
4
5
6
7

Arguments

x

A paired vector of x values

y

A paired vector of y values

x0

The x value to anchor the transform

y0

The y value to anchor the transform

slope

The slope (in units of y/x) to use for the transform

Value

A list with component functions trans and inverse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
age_depth_model(
  alta_lake_210Pb_ages,
  depth = depth_cm, age = age_year_ad,
  age_max = age_year_ad + age_error_yr,
  age_min = age_year_ad - age_error_yr,
  extrapolate_age_below = ~age_depth_extrapolate(
    tail(.x, 3), tail(.y, 3), x0 = dplyr::last, y0 = dplyr::last
  ),
  extrapolate_age_above = ~age_depth_extrapolate(
    head(.x, 3), head(.y, 3), x0 = dplyr::first, y0 = dplyr::first
  )
)

tidypaleo documentation built on April 7, 2021, 5:10 p.m.