Structure and classes of the admtools package
Niklas Hohmann
Source:vignettes/admtools_doc.Rmd
admtools_doc.RmdIntroduction
This vignette provides an overview of the larger scale structure of
the admtools package and the classes used therein.
S3 Classes
S3 class adm
Description
The S3 class adm represents age
depth models. Structurally, they are
lists with five fields:
t: numeric vector, time pointsh: numeric vectors, heightsdestr: logical vector, is the interval destructiveT_unit:NULLor a string, time unitL_unit:NULLor a string, length unit
h[i] is the height at time t[i].
h and t must be of same length and have at
least 2 elements, t must be strictly increasing and
h must be nondecreasing. length(destr) must be
identical to length(t) - 1. destr[i] == TRUE
indicates that the time interval from t[i] to
t[i+1] is destructive and no information is preserved.
Whether tie points are considered destructive is determined by the
function is_destructive. Geologically,
destr[i] == TRUE should imply h[i] == h[i+1] ,
as no sediment is accumulated during hiatuses.
Construction
The following functions construct adm objects:
-
tp_to_admfor construction from tie points -
sac_to_admfor construction from sediment accumulation curvessac -
split_multiadmfor extraction from multiple age-depth modelsmultiadm
Logic
The following functions examine the logic of adm
objects:
-
is_admto check for validity of an adm object
Representation
The following functions yield a representation of adm
objects:
-
plot.admfor plotting -
print.admfor printing to the console -
summary.admto provide a quick summary of an object
Extracting information
The following functions extract information from adm
objects:
-
condensationandcondensation_funto extract condensation -
get_L_unitandget_T_unitto extract data -
get_completenessandget_incompleteness get_heightget_timeget_hiat_durationget_hiat_listget_hiat_noget_hiat_posget_total_durationget_total_thicknessis_destructive-
sed_rate_landsed_rate_l_funto extract sedimentation rate in height domain -
sed_rate_tandsed_rate_t_funto extract sedimentation rate in time domain -
max_height.admextracts highest stratigraphic point in adm -
min_height.admextracts lowest stratigraphic point in adm -
min_time.admextracts timing of first tie point in adm -
max_time.admextracts timing of last tie point in adm -
get_L_tpandget_T_tpto extract tie points.
Transformation into other S3 classes
The following functions transform adm objects into other
S3 classes:
-
merge_adm_to_multiadmintomultiamd -
add_adm_to_multiadmto addadmtomultiadm -
anchorto transform anchoradmat a tie point with uncertainty, resulting in amultiadm -
adm_to_ddcto construct a depth-depth curve from two age-depth models
S3 class sac
Description
The S3 class sac represents sediment
accumulation curves. Structurally,
they are lists with four fields:
-
t: numeric vector, time points -
h: numeric vectors, heights -
T_unit:NULLor a string, time unit -
L_unit:NULLor a string, length unit
h[i] is the height at time t[i].
h and t must be of same length and have at
least 2 elements, t must be increasing.
Construction
The following functions construct sac objects:
Standard constructor is tp_to_sac (tie point to sediment
accumulation curve)
Logic
The following functions inspect the logic of sac
objects:
-
is_sacto check validity ofsacobject
Representation
The following functions yield a representation of sac
objects:
-
plot.sacfor plotting -
print.sacfor printing to the console -
summary.sacto provide a quick summary
S3 class multiadm
Description
The S3 class multiadm represents
multiple age depth
models.. Structurally, they are lists with the
following elements:
-
no_of_entries: Positive integer, number of age depth models contained -
tlist of lengthno_of_entries. Each element contains a numeric vector -
h: list of lengthno_of_entries. Each element contain a numeric vector -
destr: list of lengthno_of_entries. Each element contain a logic -
T_unit:NULLor a string, time unit -
L_unit:NULLor a string, length unit
h[[i]][j] is the height of the i-th age-depth model at
time t[[i]][j]. For each i, the quintuple
h[[i]], t[[i]], destr[[i]],
T_unit and L_unit specify an adm
object with the constraints as specified in the section S3 class
adm (e.g., on monotonicity, length, etc.).
T_unit and L_unit are shared among all
age-depth models in an multiamd object.
Construction
The following functions construct multiadm objects:
-
anchorto constructmultiadmfrom uncertain tie points andadmobjects. -
merge_adm_to_multiadmto constructmultiadmfromadmobjects -
sedrate_to_multiadmconstructmultiadmfrom info on sedimentation rates, seevignette("adm_from_sedrate") -
strat_cont_to_multiadmconstructmultiadmfrom tracer information, seevignette("adm_from_trace_cont")
Logic
The following functions inspect the logic of multiadm
objects:
-
is_multiadmto check for validity of multiadm object
Representation
The following functions yield a representation multiadm
objects:
-
plot.multiadmfor plotting -
print.multiadmfor printing to console -
summary.multiadmfor providing summary statistics
Modification
The following functions modify multiadm objects:
-
merge_multiadmto combine multiplemultiadmobjects -
set_L_unitandset_T_unitto change units
Extracting information
The following functions extract information from
multiadm objects:
-
condensationto extract condensation -
get_completenessandget_incompleteness get_heightget_hiat_durationget_hiat_listget_hiat_noget_hiat_pos-
get_L_unitandget_T_unitto extract data get_timeget_total_durationget_total_thicknessis_destructivesed_rate_lsed_rate_t-
get_T_tpandget_L_tpto extract time and length/height tie points
S3 class ddc
Description
The class ddc describes
depth-depth curves
used for correlation between sections. They are lists with the following
components:
-
h1: numeric vector, heights in section 1 -
h2: numeric vector, heights in section 2. Elements at the same position inh1andh2are coeval heights in the two sections -
L_unit_1: NULL or character, length unit of heights in section 1 -
L_unit_2: NULL or character, length unit of heights in section 2 -
sec_1_name: NULL or character, name of section 1 -
sec_2_name: NULL or character, name of section 2
Construction
ddc can be constructed using
-
adm_to_ddcto construct a depth-depth curve from two age-depth models -
tp_to_ddcto construct a depth-depth curve from coeval tie points
Representation
-
plot.ddcfor plotting depth-depth curves -
summary.ddcfor a quick summary of the ddc object
S3 classes stratlist and timelist
stratlist and timelist inherit from the
base list. They are list of stratigraphic positions or
times, associated with other data (e.g. trait values, proxy values)
Methods implemented for external S3 classes
S3 class list
admtools implements the following methods for
list:
-
strat_to_time.list: Transform strat-val pairs into time domain -
time_to_strat.list: Transform time-val pairs into strat domain
S3 class phylo
admtools implements the following methods for
phylo:
-
strat_to_time.phylo: Transform stratigraphic tree into time domain -
time_to_strat.phylo: Transform time tree into strat domain
Plotting
The following functions are used for plotting:
plot.admplotting for S3 classadmplot.multiadmplotting for S3 classmultiadmplot.sacplotting for S3 classsacplot.timelistfor plottingtimelistplot.stratlistfor plottingstratlistT_axis_labto annotate time axisL_axis_labto annotate length/depth axisplot_sed_rate_lto plot sedimentation rate in length/depth domainplot_sed_rate_tto plot sedimentation rate in time domainplot_condensationplot_erosive_intervalsto highlight erosive intervals, called afterplot.adm