Description Usage Arguments Details Value See Also Examples
This function calculates the age at a specific depth below the surface. It uses lowess interpolation to estimate a reasonable age, give the known ages of the deposit. It assumes you have already got the data from the Google sheet.
1 | interpolate_date(my_data, depth_in_m, span = 0.75, ...)
|
my_data |
|
span |
the parameter α which controls the degree of smoothing for the loess interpolation. Default is 0.75. From stats::loess |
Lowess works by fitting a weighted linear model to a local subset of the data. So we cannot interpolate ages for depths less than the shallowest date or greater than the deepest date, where we have no date data. To compute dates for those depths we need to extrapolate. Reliable non-linear statistical methods of extrapolation are hard to find (I don't think there are any), so we're better off just eye-balling the values from a depth-age plot. If you try to compute an age for a depth outside of the range of dated samples this function will return NA
An age estimate for the depth provided
1 2 3 | my_data <- get_data()
my_date_plot <- plot_dates(my_data)
interpolate_date(my_data, 1.20) # where 1.20 is the depth in meters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.