tapas2mgcv: Extract data from a pretreatment_data() list to determine...

View source: R/tapas2mgcv.R

tapas2mgcvR Documentation

Extract data from a pretreatment_data() list to determine trend with a GAM.

Description

Gathers data from a list produced with the tapas::pretreatment_data() function, and returns a data frame that can be used to determine the trend based on a Generalized Additive Model with the mgcv::gam() function.

Usage

tapas2mgcv(series = NULL)

Arguments

series

A list that was generated with the tapas::pretreatment_data() function.

Details

The tapas::pretreatment_data() function sometimes may generate NA values in the cm_top and cm_bot columns for the first and/or the last samples in a temporal series. The tapas::tapasa2mgcv() function removes these NA values automatically by taking the sediment-accumulation rate of adjacent binned samples.

Value

The returned data frame includes the following columns: cm_top, cm_bot, age_top, age_bot, volI, and in addition one column for each of the variables that were included in the input data frame for the tapas::pretreatment_data() function. The returned age corresponds to the age_top of the samples.

Author(s)

Walter Finsinger

See Also

mgcv2tapas()


wfinsinger/tapas documentation built on Aug. 22, 2024, 4:28 a.m.