Structure and classes of the admtools package
Niklas Hohmann
Source:vignettes/admtools_doc.Rmd
admtools_doc.Rmd
Introduction
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
:NULL
or a string, time unitL_unit
:NULL
or 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_adm
for construction from tie points -
sac_to_adm
for construction from sediment accumulation curvessac
-
split_multiadm
for extraction from multiple age-depth modelsmultiadm
Logic
The following functions examine the logic of adm
objects:
-
is_adm
to check for validity of an adm object
Representation
The following functions yield a representation of adm
objects:
-
plot.adm
for plotting -
print.adm
for printing to the console -
summary.adm
to provide a quick summary of an object
Extracting information
The following functions extract information from adm
objects:
-
condensation
andcondensation_fun
to extract condensation -
get_L_unit
andget_T_unit
to extract data -
get_completeness
andget_incompleteness
get_height
get_time
get_hiat_duration
get_hiat_list
get_hiat_no
get_hiat_pos
get_total_duration
get_total_thickness
is_destructive
-
sed_rate_l
andsed_rate_l_fun
to extract sedimentation rate in height domain -
sed_rate_t
andsed_rate_t_fun
to extract sedimentation rate in time domain -
max_height.adm
extracts highest stratigraphic point in adm -
min_height.adm
extracts lowest stratigraphic point in adm -
min_time.adm
extracts timing of first tie point in adm -
max_time.adm
extracts timing of last tie point in adm -
get_L_tp
andget_T_tp
to extract tie points.
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
:NULL
or a string, time unit -
L_unit
:NULL
or 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_sac
to check validity ofsac
object
Representation
The following functions yield a representation of sac
objects:
-
plot.sac
for plotting -
print.sac
for printing to the console -
summary.sac
to 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 -
t
list 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
:NULL
or a string, time unit -
L_unit
:NULL
or 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:
-
anchor
to constructmultiadm
from uncertain tie points andadm
objects. -
merge_adm_to_multiadm
to constructmultiadm
fromadm
objects -
sedrate_to_multiadm
constructmultiadm
from info on sedimentation rates, seevignette("adm_from_sedrate")
-
strat_cont_to_multiadm
constructmultiadm
from tracer information, seevignette("adm_from_trace_cont")
Logic
The following functions inspect the logic of multiadm
objects:
-
is_multiadm
to check for validity of multiadm object
Representation
The following functions yield a representation multiadm
objects:
-
plot.multiadm
for plotting -
print.multiadm
for printing to console -
summary.multiadm
for providing summary statistics
Modification
The following functions modify multiadm
objects:
-
merge_multiadm
to combine multiplemultiadm
objects -
set_L_unit
andset_T_unit
to change units
Extracting information
The following functions extract information from
multiadm
objects:
-
condensation
to extract condensation -
get_completeness
andget_incompleteness
get_height
get_hiat_duration
get_hiat_list
get_hiat_no
get_hiat_pos
-
get_L_unit
andget_T_unit
to extract data get_time
get_total_duration
get_total_thickness
is_destructive
sed_rate_l
sed_rate_t
-
get_T_tp
andget_L_tp
to extract time and length/height tie points
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
Plotting
The following functions are used for plotting:
plot.adm
plotting for S3 classadm
plot.multiadm
plotting for S3 classmultiadm
plot.sac
plotting for S3 classsac
plot.timelist
for plottingtimelist
plot.stratlist
for plottingstratlist
T_axis_lab
to annotate time axisL_axis_lab
to annotate length/depth axisplot_sed_rate_l
to plot sedimentation rate in length/depth domainplot_sed_rate_t
to plot sedimentation rate in time domainplot_condensation
plot_erosive_intervals
to highlight erosive intervals, called afterplot.adm