Predict age and depth values

# S3 method for age_depth_model
predict(object, .data = NULL, depth = NULL, age = NULL, ...)

predict_depth(object, age)

predict_age(object, depth)

Arguments

object

An age_depth_model object

.data

Optional input data frame

depth, age

Specify exactly one of these to predict the other.

...

Unused

Value

A data frame with the same number of observations as the input age or depth vector.

Examples

adm <- 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
)

predict(adm, depth = 1:5)
#> # A tibble: 5 × 5
#>   depth   age age_min age_max method     
#>   <int> <dbl>   <dbl>   <dbl> <chr>      
#> 1     1 2008    2008.   2008. interpolate
#> 2     2 1998.   1997.   1999. interpolate
#> 3     3 1982.   1980.   1984. interpolate
#> 4     4 1966.   1961.   1970. interpolate
#> 5     5 1947.   1939.   1955. interpolate