Title: | Estimate and Manipulate Age-Depth Models |
---|---|
Description: | Estimate age-depth models from stratigraphic and sedimentological data, and transform data between the time and stratigraphic domain. |
Authors: | Niklas Hohmann [aut, cre] |
Maintainer: | Niklas Hohmann <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.4.0.9000 |
Built: | 2024-11-25 10:26:18 UTC |
Source: | https://github.com/mindthegap-erc/admtools |
add adm object ot multiadm object
add_adm_to_multiadm(x, ...)
add_adm_to_multiadm(x, ...)
x |
multiadm object |
... |
adm objects to be added to x |
a multiadm object
anchors a deterministic age-depth model (adm object) at a tie point that is associated with uncertainty.
anchor(x, index = "last", t_anchor = NULL, n = 1000L)
anchor(x, index = "last", t_anchor = NULL, n = 1000L)
x |
age-depth model |
index |
"last" or "first", or an integer (marked by L, e.g. 2L), specifying at which tie point the age-depth model will be anchored. If i is passed as integer, the i-th tie point is anchored. |
t_anchor |
time at which the adm is anchored. must be a function that takes no arguments and returns the timing of the tie point. see example or vignettes for details |
n |
integer, number of samples drawn from the tie point |
a collection of age-depth models (a multiadm object)
t_anchor = function() rnorm(1) # normally distributed uncertainty x = tp_to_adm(t = c(1,2, 3), h = c(2,3, 4)) # simple age-depth model m = anchor(x, index = "last", t_anchor = t_anchor, n = 100) # anchor age-depth model plot(m) m = anchor(x, index = 2L, t_anchor = t_anchor, n = 100) plot(m)
t_anchor = function() rnorm(1) # normally distributed uncertainty x = tp_to_adm(t = c(1,2, 3), h = c(2,3, 4)) # simple age-depth model m = anchor(x, index = "last", t_anchor = t_anchor, n = 100) # anchor age-depth model plot(m) m = anchor(x, index = 2L, t_anchor = t_anchor, n = 100) plot(m)
Data exported from CarboCATLite model run, equivalent to scenario A from Hohmann et al. (2024). See therein for details.
CarboCATLite_data
CarboCATLite_data
A list with the following fields:
time_myr : time points in Myr from the model run
height_2_km_offshore_m : sediment thickness accumulated 2 km from shore
height_4_km_offshore_m : sediment thickness accumulated 4 km from shore
height_6_km_offshore_m : sediment thickness accumulated 6 km from shore
height_8_km_offshore_m : sediment thickness accumulated 8 km from shore
height_10_km_offshore_m : sediment thickness accumulated 10 km from shore
height_12_km_offshore_m : sediment thickness accumulated 12 km from shore
eustatic_SL_m : eustatic sea level used for the model run.
Elapsed model time, sea level, and accumulated sediment thickness taken from the scenario A model run here
Burgess, Peter. "CarboCAT: A cellular automata model of heterogeneous carbonate strata." Computers & geosciences 53 (2013): 129-140. doi:10.1016/j.cageo.2011.08.026
Burgess, Peter. (2023). CarboCATLite (v1.0.1). Zenodo. doi:10.5281/zenodo.8402578
Hohmann, Niklas; Koelewijn, Joël R.; Burgess, Peter; Jarochowska, Emilia. 2024. "Identification of the mode of evolution in incomplete carbonate successions." BMC Ecology and Evolution 24, 113. doi:10.1186/s12862-024-02287-2.
Hohmann, Niklas, Koelewijn, Joël R.; Burgess, Peter; Jarochowska, Emilia. 2023. “Identification of the Mode of Evolution in Incomplete Carbonate Successions - Supporting Data.” Open Science Framework. doi:10.17605/OSF.IO/ZBPWA, published under the CC-BY 4.0 license.
returns (instantaneous) condensation (time preserved per length increment) for a section
condensation(x, h, mode = "rcll", ...)
condensation(x, h, mode = "rcll", ...)
x |
adm or multiadm object |
h |
numeric vector, positions where condensation is determined |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
if x is an adm object, a numeric vector of condensations. if x is a multiadm object, a list of condensations
returns a function that determines instantaneous condensation (time preserved per strat. increment)
condensation_fun(x, mode = "rcll", ...)
condensation_fun(x, mode = "rcll", ...)
x |
adm object |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
a function
For usage with strat_cont_to_multiadm; defines constant tracer flux in the time domain
flux_const()
flux_const()
a function factory that takes no arguments
flux_linear()
, flux_quad()
, strat_cont_gen_from_tracer()
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
For usage with strat_cont_to_multiadm : defines linear tracer flux in the time domain Tracer flux is the linear function passing through the points (x0, y0) and (x1, y1)
flux_linear(x0 = 0, y0 = 1, x1 = 1, y1 = 2)
flux_linear(x0 = 0, y0 = 1, x1 = 1, y1 = 2)
x0 |
numeric, abscissa |
y0 |
numeric, ordinate |
x1 |
numeric, abscissa |
y1 |
numeric, ordinate |
a function factory that takes no arguments. Upon each evaluation, it returns a linear function passing through the points (x0, y0) and (x1, y1)
flux_const()
, flux_quad()
, strat_cont_gen_from_tracer()
For usage with strat_cont_to_multiadm : defines quadratic tracer flux in the time domain defined by the function f(x) = ax^2 + bx + c
flux_quad(a = 1, b = 1, c = 1)
flux_quad(a = 1, b = 1, c = 1)
a |
numeric |
b |
numeric |
c |
numeric |
a function factory that takes no arguments. Upon each evaluation, it returns the quadratic function f(x) = ax^2 + bx + c
flux_linear()
, flux_const()
, strat_cont_gen_from_tracer()
Determine stratigraphic (in)completeness
get_completeness(x) get_incompleteness(x)
get_completeness(x) get_incompleteness(x)
x |
an adm object |
Stratigraphic (in)completeness is expressed as a proportion, i.e. a number between 0 and 1
Number between 0 and 1, the stratigraphic (in)completeness
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,4)) get_completeness(my_adm) get_incompleteness(my_adm)
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,4)) get_completeness(my_adm) get_incompleteness(my_adm)
Extracts data from eTimeOpt. The type of data extracted depends on the output
setting used for eTimeOpt. If you want ot extract specific data, adjust the output parameter in eTimeOpt to return the correct data (e.g. 2 for r^2 envelope). See eTimeOpt documentation for details on this. Then call this function on the return variable.
get_data_from_eTimeOpt(res, index = 1)
get_data_from_eTimeOpt(res, index = 1)
res |
results generated by eTimeOpt |
index |
which output should be extracted? See description for details |
a list with three entries "sed_rate" : numeric vector, sedimentation rates "height" : numeric vector, heights "results" : matrix with length(height) rows and length(sed_rate) columns. results of eTimeOpt
sed_rate_from_matrix()
to use define sedimentation rates based on this functions outputs, sedrate_to_multiadm()
to estimate age-depth models from the outputs.
Takes an adm object and a vector of times, and returns the stratigraphic heights deposited at said times
get_height(x, t, destructive = TRUE, out_dom_val_h = "default", ...)
get_height(x, t, destructive = TRUE, out_dom_val_h = "default", ...)
x |
an adm or multiadm object |
t |
vector of times |
destructive |
logical - should destructive intervals be considered? See Details |
out_dom_val_h |
"strat_limits", "default", or a vector with one or two entries. What value is assigned to times that are not covered by the age-depth model? |
... |
parameters handed over to is_destructive |
if destructive is true, NA is returned for times that coincide with destructive intervals. This is achieved by calling is_destructive with arguments passed by ....
out_dom_val specified the return value for times that are not covered by the age-depth model. For "default", NA is returned. For "strat_limits", the lowest resp. highest stratigraphic position is returned. For a vector of length one, this value is assigned to both sides. For a vector or length 2 or more, the first and second entries are assigned on the left (resp. right) side
a vector with same length as t, containing the strat heights deposited
returns a vector of hiatus durations
get_hiat_duration(x)
get_hiat_duration(x)
x |
an adm object |
a vector with one element per hiatus: the duration of the hiatus
get_hiat_pos()
to determine only stratigraphic position of hiatuses
get_hiat_no()
to determine number of hiatuses in an adm
get_hiat_list()
to get hiatus position, stat & end time
returns a list with hiatus position and timing (start & end)
get_hiat_list(x)
get_hiat_list(x)
x |
an adm object |
a list with one element per hiatus. each element is a named vector with the following entries:
"height" : stratigraphic position of hiatus
"start" : time when hiatus begins
"end" : time when hiatus ends
get_hiat_pos()
to determine only stratigraphic position of hiatuses
get_hiat_no()
to determine number of hiatuses in an adm
get_hiat_duration()
to determine duration of hiatuses
Determines the number of hiatuses in an age-depth model
get_hiat_no(x)
get_hiat_no(x)
x |
an adm object |
An integer, no. of hiatuses in the age-depth model
get_hiat_pos()
to determine stratigraphic positions of hiatuses
get_hiat_list()
to determine position and timing of hiatuses
get_hiat_duration()
to determine duration of hiatuses
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3)) # one hiatus get_hiat_no(my_adm)
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3)) # one hiatus get_hiat_no(my_adm)
Determines stratigraphic position of hiatuses
get_hiat_pos(x)
get_hiat_pos(x)
x |
an adm object |
numeric vector with stratigraphic positions of hiatuses
get_hiat_list()
to get hiatus positions and durations
get_hiat_no()
to determine number of hiatuses
get_hiat_duration()
to determine duration of hiatuses
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3)) # one hiatus at height 2 get_hiat_pos(my_adm)
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3)) # one hiatus at height 2 get_hiat_pos(my_adm)
extracts the height/length time points from an age-depth model or sediment accumulation curve
get_L_tp(x, ...)
get_L_tp(x, ...)
x |
age-depth model (adm/multiadm) or sediment accumulation curve (sac) |
... |
other options, currently not used |
numeric vector of the time/length tie points
get_T_tp()
to extract time tie points
extracts the length unit from adm or multiadm object
get_L_unit(x, ...)
get_L_unit(x, ...)
x |
adm or multiadm object |
... |
other parameters |
character - the length unit of x
Extracts the time tie points from an age-depth model or sediment accumulation curve
get_T_tp(x, ...)
get_T_tp(x, ...)
x |
age-depth model (adm/multiadm) or sediment accumulation curve (sac) |
... |
other options, currently unused |
a vector, containing the time tie points
get_L_tp()
to extract length/height tie points
extracts the Time unit from adm or multiadm object
get_T_unit(x, ...)
get_T_unit(x, ...)
x |
adm or multiadm object |
... |
other parameters |
character - the time unit of x
Takes an age-depth model and vector of stratigraphic positions to determine the corresponding time of formation
get_time(x, h, hiat_mode = "start", bdry_pts_hiat = "destructive", out_dom_val_t = "default")
get_time(x, h, hiat_mode = "start", bdry_pts_hiat = "destructive", out_dom_val_t = "default")
x |
an adm or multiadm object |
h |
vector of stratigraphic positions |
hiat_mode |
"start", "end", or "destroy". If a stratigraphic position coincides with a hiatus, what should be returned? |
bdry_pts_hiat |
"consistent" or "destructive". How are hiatuses at the start/end of the adm treated? |
out_dom_val_t |
:"default", "time_limits", or a numeric value. What value is returned for heights not covered by the age-depth model? |
If a stratigraphic position coincides with a hiatus, should the start time or the end time of the hiatus be returned? Using "destroy" returns NA If the adm starts/ends with a hiatus, should the time returned be consistent with hiat_mode, or should it be NA?
numeric vector. Times of deposition of the provided heights in h
Total duration covered
get_total_duration(x, ...)
get_total_duration(x, ...)
x |
age-depth model (adm/multiadm) or sediment accumulation curve (sac) |
... |
other options, currently unused |
numeric, total duration covered by the age-depth models/sediment accumulation curve
min_time()
and max_time()
to extract the first/last tie point in time
for sediment accumulation curves, returns the difference between the highest and lowest point of the curve. For age-depth models, returns the total thickness of sediment accumulated.
get_total_thickness(x, ...)
get_total_thickness(x, ...)
x |
an age-depth model (adm/multiadm) or a sediment accumulation curve (sac) |
... |
other options, currently unused |
numeric, total sediment thickness accumulated
max_height()
and min_height()
to extract the highest/lowest stratigraphic point
Constructors for adm objects such as tp_to_adm do not check whether the inputs define a valid age-depth mode, e.g. one where the law of superposition holds. This function performs these checks
is_adm(x, quietly = TRUE)
is_adm(x, quietly = TRUE)
x |
an object |
quietly |
logical. should descriptive warnings be shown? |
logical. Is the input a valid adm object?
x = tp_to_adm(t = c(2,1), h = c(1,2)) # reversed order of time tie points is_adm(x) # returns FALSE
x = tp_to_adm(t = c(2,1), h = c(1,2)) # reversed order of time tie points is_adm(x) # returns FALSE
Determines whether specified time is destructive or not
is_destructive(x, t, mode = "rcll", bdry_pts_hiat = "destructive", out_dom_mode = "default")
is_destructive(x, t, mode = "rcll", bdry_pts_hiat = "destructive", out_dom_mode = "default")
x |
an adm or multiadm object |
t |
vector of times |
mode |
string, either "rcll", "lcrl", "open", or "closed" |
bdry_pts_hiat |
string, "destructive" or "consistent". If the adm starts/ends with a hiatus, should the start/end be removed, or treated consistently with mode? |
out_dom_mode |
""default", "destructive", or "conservative" |
logical vector of same length as t. Is deposition at time t destructive?
is valid multiadm object?
is_multiadm(x, quietly = TRUE)
is_multiadm(x, quietly = TRUE)
x |
object to be tested |
quietly |
logical, should a descriptive warning be returned? |
Logical. Is the object a valid multiadm object?
checks if the object is a valid sac object
is_sac(x)
is_sac(x)
x |
the object to check |
logical. Is x a valid sac
object?
plot height axis label
L_axis_lab( label = "Height", unit = TRUE, sep = " ", brac = c("[", "]"), line = 2, outer = FALSE, at = NA, adj = NA, padj = NA, cex = NA, col = NA, font = NA, ... )
L_axis_lab( label = "Height", unit = TRUE, sep = " ", brac = c("[", "]"), line = 2, outer = FALSE, at = NA, adj = NA, padj = NA, cex = NA, col = NA, font = NA, ... )
label |
Axis label |
unit |
Logical or character, should unit be plotted |
sep |
separator between label and unit |
brac |
brackets surrounding unit |
line |
parameter passed to mtext, see ?mtext for details |
outer |
parameter passed to mtext, see ?mtext for details |
at |
parameter passed to mtext, see ?mtext for details |
adj |
parameter passed to mtext, see ?mtext for details |
padj |
parameter passed to mtext, see ?mtext for details |
cex |
parameter passed to mtext, see ?mtext for details |
col |
parameter passed to mtext, see ?mtext for details |
font |
parameter passed to mtext, see ?mtext for details |
... |
further graphical parameters passed to mtext, see ?mtext for details |
invisible NULL
plot.adm()
for plotting of adms
plots a legend for the multiadm plot
make_legend()
make_legend()
invisible NULL
get highest stratigraphic tie point
max_height(x)
max_height(x)
x |
age-depth model (adm) or sediment accumulation curve (sac) |
number, stratigraphic position of the highest stratigraphic tie point
min_height()
, get_total_thickness()
last time tie point
max_time(x)
max_time(x)
x |
age-depth model (adm) or sediment accumulation curve (sac) |
number, last time tie point of the age-depth model/sediment accumulation curve
min_time()
, get_total_duration()
returns the mean adm of a multiadm object
mean_adm(x, h)
mean_adm(x, h)
x |
a multiadm object |
h |
the heights at which to evaluate the adm |
an adm object
median_adm()
and quantile_adm()
for median and quantile adms, respectively
returns the median adm of a multiadm object
median_adm(x, h)
median_adm(x, h)
x |
a multiadm object |
h |
the heights at which to evaluate the adm |
an adm object
mean_adm()
for the mean age-depth model, quantile_adm()
for the more general implementation
combine multiple adm ojects into multiadm object
merge_adm_to_multiadm(...)
merge_adm_to_multiadm(...)
... |
adm objects |
object of class multiadm
merge multiple multiadm objects
merge_multiadm(...)
merge_multiadm(...)
... |
adm objects |
multiadm object
get lowest stratigraphic tie point
min_height(x)
min_height(x)
x |
an age-depth model (adm) or sediment accumulation curve (sac) |
number, stratigraphic position of lowest tie point
get_total_thickness()
, max_height()
first time tie point
min_time(x)
min_time(x)
x |
age-depth model (adm) or sediment accumulation curve (sac) |
number, timing of first tie point of the age-depth model/sediment accumulation curve
max_time()
, get_total_duration()
plots condensation (time per stratigraphic increment) throughout the section
plot_condensation(x, h = "default", mode = "rcll", ...)
plot_condensation(x, h = "default", mode = "rcll", ...)
x |
an adm object |
h |
"default" or a numeric vector of height where the sed rate is evaluated |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
invisible null
mark erosive time intervals
plot_erosive_intervals( density = NULL, angle = 45, col = "azure3", border = NA, lty = 1, lwd = 1 )
plot_erosive_intervals( density = NULL, angle = 45, col = "azure3", border = NA, lty = 1, lwd = 1 )
density |
parameter passed to rect, see ?rect for details |
angle |
parameter passed to rect, see ?rect for details |
col |
parameter passed to rect, see ?rect for details |
border |
parameter passed to rect, see ?rect for details |
lty |
parameter passed to rect, see ?rect for details |
lwd |
parameter passed to rect, see ?rect for details |
invisible NULL
plot sed. rate in height
plot_sed_rate_l(x, h = "default", mode = "rcll", ...)
plot_sed_rate_l(x, h = "default", mode = "rcll", ...)
x |
an adm object |
h |
"default" or a numeric vector of height where the sed rate is evaluated |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
invisible null
plot sedimentation rate in time
plot_sed_rate_t(x, mode = "rcll")
plot_sed_rate_t(x, mode = "rcll")
x |
adm object |
mode |
string, "rcll" or "lcrl". Should the sedimentation rate be Right Continuous with Left Limits (rcll) or Left Continuous with Right Limits (lcrl) |
invisible NULL
plotting adm objects
## S3 method for class 'adm' plot( x, lwd_destr = 1, lwd_acc = 1, lty_destr = 3, lty_acc = 1, col_destr = "black", col_acc = "black", ... )
## S3 method for class 'adm' plot( x, lwd_destr = 1, lwd_acc = 1, lty_destr = 3, lty_acc = 1, col_destr = "black", col_acc = "black", ... )
x |
an adm object |
lwd_destr |
line width of hiatuses |
lwd_acc |
line width of conservative intervals |
lty_destr |
linetype of hiatuses |
lty_acc |
line type of conservative intervals |
col_destr |
color of erosive intervals |
col_acc |
color of conservative intervals |
... |
arguments passed to plot |
L_axis_lab()
and T_axis_lab()
for plotting time and axis labels, the vignette on plotting available via browseVignettes(package = "admtools")
plots the median age (red) and the 95 % envelope (blue) of a multiadm object
## S3 method for class 'multiadm' plot(x, ...)
## S3 method for class 'multiadm' plot(x, ...)
x |
multiadm object |
... |
parameters passed to |
a plot of the multiadm object
## Not run: # see vignette("adm_from_trace_cont") # and vignette("adm_from_sedrate") # for example plots. ## End(Not run)
## Not run: # see vignette("adm_from_trace_cont") # and vignette("adm_from_sedrate") # for example plots. ## End(Not run)
plot sediment accumulation curve
## S3 method for class 'sac' plot(x, ...)
## S3 method for class 'sac' plot(x, ...)
x |
object of class sac |
... |
further parameters (currently ignored) |
invisible NULL
plots a stratlist
, i.e. a list of values associated with stratigraphic positions (typically returned by time_to_strat). will plot the element with matching ord_name
against stratigraphic positions.
## S3 method for class 'stratlist' plot(x, orientation = "du", ord_name = "y", ...)
## S3 method for class 'stratlist' plot(x, orientation = "du", ord_name = "y", ...)
x |
stratlist object |
orientation |
character, either "du" (down-up) or "lr" (left-right). Orientation of plotting |
ord_name |
name of the ordinate. Values plotted against time |
... |
further arguments passed to plot |
plot time lists
## S3 method for class 'timelist' plot(x, ...)
## S3 method for class 'timelist' plot(x, ...)
x |
a time list |
... |
other options passed to plot |
returns the quantile adm of a multiadm object
quantile_adm(x, h, p)
quantile_adm(x, h, p)
x |
a multiadm object |
h |
the heights at which to evaluate the adm |
p |
percentile, as number between 0 and 1 |
an adm object
median_adm()
to extract the median adm, mean_adm()
for the mean adm
turn sed. acc curve into adm
sac_to_adm(x)
sac_to_adm(x)
x |
object of class sac |
object of class adm
tp_to_adm()
for the generator of adm
Construct a sedimentation rate generator (function factory) from a matrix, e.g. one returned from get_data_from_eTimeOpt
. This generator can be passed on to sedrate_to_multiadm
to estimate age-depth models from it.
If mode is "deterministic", the generator evaluates the sedimentation rates at heights specified by height
, if the mode is "poisson" it is evaluated at heights that are determined based on a poisson point process. At these heights, the value of the sedimentation rate is determined based on the (pseudo) pdf that is determined by the matrix values.
sed_rate_from_matrix( height, sedrate, matrix, mode = "deterministic", rate = 1, expand_domain = TRUE, transform = identity )
sed_rate_from_matrix( height, sedrate, matrix, mode = "deterministic", rate = 1, expand_domain = TRUE, transform = identity )
height |
vector of heights |
sedrate |
vector of sed. rates x values |
matrix |
matrix of sed rate y values. Must have as many columns as length(height) and as many rows as length(sedrate). |
mode |
character, "deterministic" or "poisson". Determines at which stratigraphic heights the sed rate is determined. If "deterministic" this will be the heights in |
rate |
numeric, rate of the Poisson point process determining frequency of sedimentation rate changes. |
expand_domain |
should sedimentation rates be defined below/above the highest/lowest height in the section? If TRUE, the sed rate values are the values at the closest interpolated point, if FALSE it will be NA |
transform |
a function, the identity function by default. How should the values of the (pseudo)pdf defined by the entries of |
a function factory for usage with sedrate_to_multiadm
sedrate_to_multiadm()
for estimating sedimentation rates based on the outputs, get_data_from_eTimeOpt()
for extracting data from the eTimeOpt
function of the astrochron package.
constructs a sedimentation rate generator for usage with sedrate_to_multiadm
based on the following procedure: (1) determine stratigraphic points based on a Poisson point process with rate rate
(2) at these points, determine the sedimentation rate based on a uniform distribution between the bounds provided by the input parameters (3) linearly interpolate between those points with sedimentation rate determined in step 2.
This approach can be used to estimate age-depth models when only rough boundaries on sedimentation rates are available. Here, the uniform distribution is chosen to reflect that no other information other than maximum and minimum sed. rate is available.
sed_rate_gen_from_bounds(h_l, s_l, h_u, s_u, rate = 1)
sed_rate_gen_from_bounds(h_l, s_l, h_u, s_u, rate = 1)
h_l |
height values for lower bounds |
s_l |
sed rate values for lower bounds |
h_u |
height values for upper bounds |
s_u |
sed rate values for upper bounds |
rate |
rate of poisson point process |
a function factory for usage with sedrate_to_multiadm
sedrate_to_multiadm()
for estimating age-depth models using the outputs, sed_rate_from_matrix()
for other means of defining sedimentation rates
# see vignette # vignette("adm_from_sedrate") # for an example
# see vignette # vignette("adm_from_sedrate") # for an example
determines instantaneous sedimentation rate at a specified stratigraphic position
sed_rate_l(x, h, mode = "rcll", ...)
sed_rate_l(x, h, mode = "rcll", ...)
x |
adm object |
h |
numeric vector, stratigraphic positions |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
a vector of sed rates (if x is an adm object), or a list of sedimentation rates
returns a function that determines sed. rates in height
sed_rate_l_fun(x, mode = "rcll", ...)
sed_rate_l_fun(x, mode = "rcll", ...)
x |
an adm object |
mode |
string, handed over to sed_rate_t, see ?sed_rate_t for details |
... |
parameters passed to get_time, see ?get_time for details |
a function
infers the instantaneous sedimentation rate from adm objects
sed_rate_t(x, t, mode = "rcll")
sed_rate_t(x, t, mode = "rcll")
x |
adm or multiadm object |
t |
vector of times at which sedimentation rates are determined |
mode |
string, "rcll" or "lcrl". at non-differential points, is the sed rate left or right continuous? |
for adm objects, a vector giving sed. accumulation rates at time t. For multiadm objects, a list with accumulation rates
returns a function that returns sedimentation rate
sed_rate_t_fun(x, mode = "rcll")
sed_rate_t_fun(x, mode = "rcll")
x |
an adm object |
mode |
string, "rcll" or "lcrl". Should the sedimentation rate be Right Continuous with Left Limits (rcll) or Left Continuous with Right Limits (lcrl) |
a function
Combines information on tie points and sedimentation rates to estimate age-depth models and their associated uncertainty. For an example, see vignette("adm_from_sedrate")
.
sedrate_to_multiadm( h_tp, t_tp, sed_rate_gen, h, no_of_rep = 100L, subdivisions = 100L, stop.on.error = TRUE, T_unit = NULL, L_unit = NULL )
sedrate_to_multiadm( h_tp, t_tp, sed_rate_gen, h, no_of_rep = 100L, subdivisions = 100L, stop.on.error = TRUE, T_unit = NULL, L_unit = NULL )
h_tp |
: function, returns stratigraphic positions of tie points |
t_tp |
: function, returns times of tie points |
sed_rate_gen |
: function, returns function describing sedimentation rate |
h |
: numeric, heights where the adm is calculated |
no_of_rep |
: integer, number of repetitions |
subdivisions |
maximum no of subintervals used in numeric integration. passed to integrate, see ?stats::integrate for details |
stop.on.error |
logical passed to integrate, see ?stats::integrate for details |
T_unit |
time unit |
L_unit |
length unit |
object of class multiadm
## Not run: # see this vignette for an example vignette("adm_from_sedrate") ## End(Not run)
## Not run: # see this vignette for an example vignette("adm_from_sedrate") ## End(Not run)
set length units for adm and multiadm objects
set_L_unit(x, L_unit, ...)
set_L_unit(x, L_unit, ...)
x |
adm or multiadm object |
L_unit |
time unit |
... |
further parameters |
an adm or multiadm object with the L unit assigned
set time units for adm and multiadm objects
set_T_unit(x, T_unit, ...)
set_T_unit(x, T_unit, ...)
x |
adm or multiadm object |
T_unit |
time unit |
... |
further parameters |
an adm or multiadm object with the time unit assigned
split multiadm objects into adm
split_multiadm(x)
split_multiadm(x)
x |
a multiadm object |
list with objects of class adm
Generates a function factory for usage with strat_cont_to_multiadm based on empirical tracer measurements in the section
strat_cont_gen_from_tracer( bin_borders, df, distribution = "normal", cap = TRUE, cap_val = 0 )
strat_cont_gen_from_tracer( bin_borders, df, distribution = "normal", cap = TRUE, cap_val = 0 )
bin_borders |
borders of sampling bins |
df |
data frame with proxy records |
distribution |
character, currently only "normal" implemented. Specifies the distribution of proxies |
cap |
logical. Should values below |
cap_val |
numeric. If |
a functional for usage with strat_cont_to_multiadm
flux_const()
, flux_linear()
, flux_quad()
to define tracer fluxes
## Not run: # see this vignette for a use case vignette("adm_from_trace_cont") ## End(Not run)
## Not run: # see this vignette for a use case vignette("adm_from_trace_cont") ## End(Not run)
Estimates age-depth models by comparing observed tracer values in a section with assumptions on tracer flux in time. See vignette("adm_from_trace_cont")
for a full example.
strat_cont_to_multiadm( h_tp, t_tp, strat_cont_gen, time_cont_gen, h, no_of_rep = 100L, subdivisions = 100L, stop.on.error = TRUE, T_unit = NULL, L_unit = NULL )
strat_cont_to_multiadm( h_tp, t_tp, strat_cont_gen, time_cont_gen, h, no_of_rep = 100L, subdivisions = 100L, stop.on.error = TRUE, T_unit = NULL, L_unit = NULL )
h_tp |
function, returning tie point heights |
t_tp |
function, returning tie points times |
strat_cont_gen |
function, describing tracer data observed in the section |
time_cont_gen |
function, describing tracer changes in time |
h |
numeric vector, heights where the age depth model is described |
no_of_rep |
integer, number of age depth models generated |
subdivisions |
integer, max no. of subintervals used by integration procedure. passed to integrate, see ?stats::integrate for details |
stop.on.error |
logical passed to integrate, see ?stats::integrate for details |
T_unit |
NULL or character, time unit |
L_unit |
NULL or character, length unit |
Object of class multiadm
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
Takes an object and transforms it from the time domain into the stratigraphic domain using the provided age-depth model.
Currently implemented for the "phylo", "list", and "numeric" class. Wraps around get_time
.
strat_to_time(obj, x, ...)
strat_to_time(obj, x, ...)
obj |
the object to be transformed |
x |
age-depth model |
... |
other parameters |
an object of the same type as obj
time_to_strat()
to transform data from the time to the stratigraphic domain, strat_to_time.phylo()
, strat_to_time.numeric()
and strat_to_time.list()
for details on how to transform phylogenetic trees, vectors, and lists. See get_time()
for the underlying procedure.
Lists are useful to keep data closely associated. This function transforms a list that contains observations associated with a stratigraphic position (recorded in the element with name "h") into a list where the observations are associated with time.
## S3 method for class 'list' strat_to_time(obj, x, ...)
## S3 method for class 'list' strat_to_time(obj, x, ...)
obj |
a list with one element named "h", which will be interpreted as stratigraphic positions |
x |
an adm object |
... |
options passed to |
a timelist
(inherits from list
). A list with one named element "t" instead of the element "h". This element contains the times of the stratigraphic positions in "h".
time_to_strat.list()
for the transformation from time to height domain, get_time()
for the underlying procedure, time_to_strat()
for the higher level function
# see vignette("admtools") for an example
# see vignette("admtools") for an example
This function transforms numeric vectors from the stratigraphic to the time domain Fundamentally a wrapper around get_time for consistent syntax
## S3 method for class 'numeric' strat_to_time(obj, x, ...)
## S3 method for class 'numeric' strat_to_time(obj, x, ...)
obj |
a numeric vector representing stratigraphic positions. |
x |
an adm object |
... |
options passed to |
A numeric vector with times of deposition of the entries in obj
time_to_strat.numeric()
for the transformation from time to height domain, get_time()
for the underlying procedure, time_to_strat()
for the higher level function, strat_to_time.list()
and strat_to_time.phylo()
for the transformation of lists and phylogenetic trees.
# see vignette("admtools") for an example
# see vignette("admtools") for an example
transform phylo object from the stratigraphic domain to the time domain
## S3 method for class 'phylo' strat_to_time(obj, x, ...)
## S3 method for class 'phylo' strat_to_time(obj, x, ...)
obj |
the phylo object to be transformed |
x |
age-depth model |
... |
parameters passed to get_time |
a phylo object, representation of the tree in the time domain
get_time()
for the underlying procedure, strat_to_time()
for the higher level function, and time_to_strat.phylo()
for the transformation of phylo objects from the time to the strat domain.
Displays some summary numbers of an age-depth models
## S3 method for class 'adm' summary(object, ...)
## S3 method for class 'adm' summary(object, ...)
object |
an adm object |
... |
other variables, are ignored |
Invisible NULL, prints summary to the console
my_adm = tp_to_adm(t = 1:5, h = c(2,2,3), L_unit = "m", T_unit = "Myr" ) summary(my_adm)
my_adm = tp_to_adm(t = 1:5, h = c(2,2,3), L_unit = "m", T_unit = "Myr" ) summary(my_adm)
Displays some summary numbers of an age-depth models
## S3 method for class 'multiadm' summary(object, ...)
## S3 method for class 'multiadm' summary(object, ...)
object |
a multiadm object |
... |
other variables, are ignored |
Invisible NULL, prints summary to the console
displays some summary numbers of sediment accumulation curve
## S3 method for class 'sac' summary(object, ...)
## S3 method for class 'sac' summary(object, ...)
object |
sediment accumulation curve (sac) |
... |
other variables, are ignored |
invisible NULL
plot time axis label
T_axis_lab( label = "Time", unit = TRUE, sep = " ", brac = c("[", "]"), line = 2, outer = FALSE, at = NA, adj = NA, padj = NA, cex = NA, col = NA, font = NA, ... )
T_axis_lab( label = "Time", unit = TRUE, sep = " ", brac = c("[", "]"), line = 2, outer = FALSE, at = NA, adj = NA, padj = NA, cex = NA, col = NA, font = NA, ... )
label |
Axis label |
unit |
Logical or character, should unit be plotted |
sep |
separator between label and unit |
brac |
brackets surrounding unit |
line |
parameter passed to mtext, see ?mtext for details |
outer |
parameter passed to mtext, see ?mtext for details |
at |
parameter passed to mtext, see ?mtext for details |
adj |
parameter passed to mtext, see ?mtext for details |
padj |
parameter passed to mtext, see ?mtext for details |
cex |
parameter passed to mtext, see ?mtext for details |
col |
parameter passed to mtext, see ?mtext for details |
font |
parameter passed to mtext, see ?mtext for details |
... |
further graphical parameters passed to mtext, see ?mtext for details |
invisible NULL
plot.adm()
for plotting of adms
Takes an object and transforms it from the time domain into the stratigraphic domain using the provided age-depth model. Currently implemented for the "phylo", "list", and "numeric" class.
time_to_strat(obj, x, ...)
time_to_strat(obj, x, ...)
obj |
the object to be transformed |
x |
age-depth model for the transformation |
... |
other parameters |
an object of the same type as obj
strat_to_time()
to transform data from the stratigraphic domain to the time domain, time_to_strat.phylo()
, time_to_strat.numeric()
and time_to_strat.list()
for details on how to transform phylo objects, vectors, and lists. See get_height()
for the underlying procedure.
Lists are useful to keep data closely associated. This function transforms a list that contains observations associated with a time (recorded in the element with name "t") into a list where the observations are associated with stratigraphic position.
## S3 method for class 'list' time_to_strat(obj, x, ...)
## S3 method for class 'list' time_to_strat(obj, x, ...)
obj |
a list with one element named "t", which will be interpreted as time |
x |
an adm object |
... |
options passed to get_height |
a stratlist
(inherits from list
): A list with one named element "h" instead of the element "t", containing the stratigraphic positions corresponding to the times inf "t"
strat_to_time.list()
for the transformation from height to time domain, time_to_strat.phylo()
and time_to_strat.numeric()
for transformations of phylogenetic trees and vectors. See get_height()
for the underlying procedure.
# see vignette("admtools") for an example
# see vignette("admtools") for an example
This function transforms numeric vectors from the time to the stratigraphic domain Fundamentally a wrapper around get_height for consistent syntax
## S3 method for class 'numeric' time_to_strat(obj, x, ...)
## S3 method for class 'numeric' time_to_strat(obj, x, ...)
obj |
a numeric vector, interpreted as timing of events |
x |
an adm object |
... |
options passed to get_height |
a numeric vector - stratigraphic position of the events
strat_to_time.numeric()
for the transformation from height to time domain, time_to_strat.phylo()
and time_to_strat.list()
for transformations of phylogenetic trees and lists. See get_height()
for the underlying procedure.
# see vignette("admtools") for an example
# see vignette("admtools") for an example
transform phylo object from the time domain to the stratigraphic domain
## S3 method for class 'phylo' time_to_strat(obj, x, ...)
## S3 method for class 'phylo' time_to_strat(obj, x, ...)
obj |
the phylo object to be transformed |
x |
age-depth model |
... |
other parameters, currently ignored |
a phylo object, representation of the tree in the strat domain
get_height()
for the underlying procedure, time_to_strat()
for the higher level function, and strat_to_time.phylo()
for the transformation of phylo objects from strat domain to the time domain. See time_to_strat.list()
and time_to_strat.numeric()
for the transformation of lists and numeric vectors
Time tree generated using the ape
package. Code used to generate is
set.seed(1) tree_in_time = ape::rlineage(birth = 1.8, death = 0.2, Tmax = 2)
timetree
timetree
An object of class phylo
of length 4.
defines deterministic stratigraphic tie points
tp_height_det(heights)
tp_height_det(heights)
heights |
numeric vector. Stratigraphic positions of the tie points |
a function for usage with strat_cont_to_multiadm and sedrate_to_multiamd as h_tp input
tp_time_det()
for deterministic tie points in time, tp_time_norm()
for tie points following a normal distribution, tp_time_floating_scale()
for tie points for a floating scale,
defines deterministic tie points in time.
tp_time_det(times)
tp_time_det(times)
times |
numeric vector, times of the tie points |
a function for usage with strat_cont_to_multiadm and sedrate_to_mulitadm as t_tp input
tp_height_det()
for deterministic tie points in height, tp_time_norm()
for tie points following a normal distribution
Defines tie points for a floating (auxiliary) time scale for usage with sedrate_to_multiadm and strat_cont_to_multiadm as t_tp input. This floating time scale consists of two tie points in time, the first at time t = 0, the second at time t = 1. tp_time_floating_scale
is a synonym of tp_time_det(times = c(0,1))
tp_time_floating_scale()
tp_time_floating_scale()
function for usage with strat_cont_to_multiadm and sedrate_to_multiamd as t_tp input
tp_time_norm()
for tie points following a normal distribution, tp_height_det()
for deterministic height tie points
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
## Not run: # see this vignette for an example vignette("adm_from_trace_cont") ## End(Not run)
defines a function factory that returns normally distributed times. FOr usage with sedrate_to_multiadm
and strat_cont_to_multiadm
.
tp_time_norm(mean, sd, force_order = TRUE)
tp_time_norm(mean, sd, force_order = TRUE)
mean |
numeric vector, mean age of tie points |
sd |
numeric vector, standard deviation of tie points |
force_order |
logical, enforce strictly increasing times |
function for usage with strat_cont_to_multiadm and sedrate_to_multiamd as t_tp input
tp_time_floating_scale()
for tie points for a floating scale, tp_height_det()
for deterministic height tie points
Turns tie points into an adm
object that represents an age-depth model
tp_to_adm(t, h, T_unit = NULL, L_unit = NULL)
tp_to_adm(t, h, T_unit = NULL, L_unit = NULL)
t |
Vector, tie points in time |
h |
Vector, tie points in height |
T_unit |
character, time unit |
L_unit |
character, length unit |
by default, intervals with no sediment accumulation are marked as destructive.
tp_to_adm
does not check whether the inputs define a valid age-depth model. For this, use
is_adm
object of class adm
is_adm()
to check validity of adm
objects, get_T_tp()
and get_L_tp()
to extract time and height/length tie points
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3), T_unit = "kyr", L_unit = "m") plot(my_adm) # see vignette("admtools") for other examples
my_adm = tp_to_adm(t = 1:4, h = c(1,2,2,3), T_unit = "kyr", L_unit = "m") plot(my_adm) # see vignette("admtools") for other examples
defines sac (sediment accumulation curve) object from tie points
tp_to_sac(t, h, T_unit = NULL, L_unit = NULL)
tp_to_sac(t, h, T_unit = NULL, L_unit = NULL)
t |
numeric vector, time coordinates of tie points |
h |
numeric vector, height coordinates of tie points |
T_unit |
time unit |
L_unit |
length unit |
a sac object reflecting a sediment accumulation curve
sac_to_adm()
to transform sediment accumulation curves into age-depth models, get_T_tp()
and get_L_tp()
to extract time and height/length tie points