pretreatment | R Documentation |
This is the R version of the CharPretreatment.m function, which was originally developed by Philip Higuera for "CharAnalysis" (see https://github.com/phiguera/CharAnalysis/tree/master). It has been translated from the Matlab-coded CharPretreatment.m function by Olivier Blarquez and was included in the paleofire v1.2.4 R package (https://github.com/oblarquez/paleofire). The function is now included in the tapas R package because the paleofire R package is currently not being updated.
pretreatment(
params,
serie,
Int = TRUE,
first = NULL,
last = NULL,
yrInterp = NULL
)
params |
A matrix with the following columns: CmTop, CmBot, AgeTop, AgeBot, Volume, in the same order. |
serie |
Numerical. A record to be transformed in accumulation rates. Could be the number, the area, or the volume of particles in samples. |
Int |
Logical. Specifies whether the function interpolates missing
values. By default |
first , last |
Date of the first, last sample for accumulation rate calculation, if NULL first, last are automatically specified as the the minimum and maximum ages of the record respectively. |
yrInterp |
Temporal resolution of the interpolated accumulation rates, if NULL, yrInterp is automatically specified as the median resolution of the record. |
Note: The code has been modified to calculate sediment-accumulation rates in a different way: now the code uses explicit sample thicknesses and sample-deposition times rather than diff(depth) and diff(age).
Returns an object of the class "proxy_ar_i" including:
cmI |
interpolated depths |
ybpI |
interpolated ages |
accI |
accumulation rates |
Olivier Blarquez
## Not run:
# Load raw charcoal data:
co <- tapas::co_char_data
c <- co[, 6] # charcoal counts
p <- co[, 1:5] # CmTop, CmBot, AgeTop, AgeBot, Volume
# Calculate charcoal accumulation rate (CHAR, as pieces cm-2 yr-1)
co_CHAR <- tapas::pretreatment(params = p, serie = c, Int = TRUE)
tapas::plot_ar_i(co_CHAR)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.