| Title: | Stratigraphic Columns and Order Metrics |
|---|---|
| Description: | Quantify stratigraphic disorder using the metrics defined by Burgess (2016) <doi:10.2110/jsr.2016.10>. Contains a range of utility tools to construct and manipulate stratigraphic columns. |
| Authors: | Niklas Hohmann [aut, cre] (ORCID: <https://orcid.org/0000-0003-1559-1838>) |
| Maintainer: | Niklas Hohmann <[email protected]> |
| License: | Apache License (>= 2) |
| Version: | 1.0.0.9000 |
| Built: | 2026-05-26 08:02:41 UTC |
| Source: | https://github.com/mindthegap-erc/stratcols |
defines an S3 object stratcol representing a stratigraphic column. Does not check for the validity of the constructed object. For this, use is_stratcol
as_stratcol(thickness, facies, L_unit = NULL, base = 0)as_stratcol(thickness, facies, L_unit = NULL, base = 0)
thickness |
numeric vector, bed thicknesses |
facies |
vector, facies code of beds (numeric or character) |
L_unit |
length unit of bed thickness |
base |
position of lowest bed boundary |
an object of S3 class stratcol
is_stratcol() to check for validity
n_beds = 10 # 10 beds with thickness between 0.1 and 1 m thickness = runif(n_beds, 0.1, 1) # alternations of sand and shale fa = rep(c("sand", "shale"), 5) # length unit L_unit = "m" base = 2 # start section at 2 m height s = as_stratcol(thickness, fa, L_unit, base)n_beds = 10 # 10 beds with thickness between 0.1 and 1 m thickness = runif(n_beds, 0.1, 1) # alternations of sand and shale fa = rep(c("sand", "shale"), 5) # length unit L_unit = "m" base = 2 # start section at 2 m height s = as_stratcol(thickness, fa, L_unit, base)
extracts bed thicknesses from stratigraphic column
bed_thickness(s)bed_thickness(s)
s |
stratigraphic column (a |
a numeric vector of bed thicknesses
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") thickness = bed_thickness(s) hist(thickness, main = "Bed thickness", xlab = paste0("Thickness (m)"))s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") thickness = bed_thickness(s) hist(thickness, main = "Bed thickness", xlab = paste0("Thickness (m)"))
extract facies names from stratigraphic column
facies_names(s)facies_names(s)
s |
stratigraphic column (a |
vector of facies names for each bed
unique_facies_names() to get a list of unique facies names
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") facies = facies_names(s) print(facies)s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") facies = facies_names(s) print(facies)
have successive beds identical facies?
facies_repetitions(s)facies_repetitions(s)
s |
stratigraphic column (a |
TRUE or FALSE. Do at least two successive beds have the same facies?
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") facies_repetitions(s) # returns FALSE s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "sand", "shale", "shale"), L_unit = "m") facies_repetitions(s) # returns TRUEs = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") facies_repetitions(s) # returns FALSE s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "sand", "shale", "shale"), L_unit = "m") facies_repetitions(s) # returns TRUE
find base of stratigraphic column
get_base(s)get_base(s)
s |
stratigraphic column (a |
A number, position of lowest bed boundary in the stratigraphic column
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m", base = 2) get_base(s) # returns 2s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m", base = 2) get_base(s) # returns 2
extract length unit from stratigraphic columns
get_L_unit(s)get_L_unit(s)
s |
stratigraphic column (a |
string or NULL, the length unit of the stratigraphic column
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") get_L_unit(s) # returns "m"s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") get_L_unit(s) # returns "m"
Markov order metric (Burgess 2016)
get_mom(m)get_mom(m)
m |
a facies transition matrix |
scalar, the Markov order metric introduced in Burgess (2016), https://doi.org/10.2110/jsr.2016.10
Burgess, Peter. 2016. "Identifying Ordered Strata: Evidence, Methods, and Meaning." Journal of Sedimentary Research. doi:10.2110/jsr.2016.10
transition_matrix() to estimate the facies transition matrix from a stratigraphic column, get_rom() to get the runs order metric
#see vignette for an extended example and explanation via # vignette("stratorder") # uniform bed thickness, ordered facies s = as_stratcol(thickness = runif(30), fa = rep(c(1,2,3), 10)) s = shuffle_col(s, allow_rep = TRUE) # randomize order of beds, allowing for repetitions plot(s) s_merged = merge_beds(s, mode = "identical facies") plot(s_merged) s_ord_names = order_facies_names(s_merged) plot(s_ord_names) m = transition_matrix(s_ord_names) get_mom(m)#see vignette for an extended example and explanation via # vignette("stratorder") # uniform bed thickness, ordered facies s = as_stratcol(thickness = runif(30), fa = rep(c(1,2,3), 10)) s = shuffle_col(s, allow_rep = TRUE) # randomize order of beds, allowing for repetitions plot(s) s_merged = merge_beds(s, mode = "identical facies") plot(s_merged) s_ord_names = order_facies_names(s_merged) plot(s_ord_names) m = transition_matrix(s_ord_names) get_mom(m)
Determines the run order metric introduced in Burgess (2016), https://doi.org/10.2110/jsr.2016.10
get_rom(s, strictly = TRUE)get_rom(s, strictly = TRUE)
s |
stratigraphic column (a |
strictly |
logical. Does bed thickness need to be strictly increasing (>) or not (>=) to be counted as thickening? |
a number, the runs order metric (rom)
Burgess, Peter. 2016. "Identifying Ordered Strata: Evidence, Methods, and Meaning." Journal of Sedimentary Research. doi:10.2110/jsr.2016.10
get_mom() to get the Markov order metric
#see vignette for an extended example, bootstrapping methods and explanation via # vignette("stratorder") s = as_stratcol(thickness = runif(90), facies = rep(c(1,2,3), 30)) plot(s) get_rom(s) # returns a number, the runs order metric#see vignette for an extended example, bootstrapping methods and explanation via # vignette("stratorder") s = as_stratcol(thickness = runif(90), facies = rep(c(1,2,3), 30)) plot(s) get_rom(s) # returns a number, the runs order metric
determines if x is a valid stratcol object
is_stratcol(x)is_stratcol(x)
x |
stratigraphic column (a |
logical - is the object a valid stratcol object?
as_stratcol() to define stratcol objects
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") is_stratcol(s) # returns TRUE s$fa = NULL # break stratcolumn object is_stratcol(s) # returns FALSEs = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") is_stratcol(s) # returns TRUE s$fa = NULL # break stratcolumn object is_stratcol(s) # returns FALSE
merge beds in stratigraphic column
merge_beds(s, mode = "identical facies", ...)merge_beds(s, mode = "identical facies", ...)
s |
stratigraphic column (a |
mode |
character. criteria for merging. currently only "identical facies" is implemented |
... |
other parameters. currently not used |
a stratigraphic column (a stratcol object)
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "sand", "shale", "shale"), L_unit = "m") merge_beds(s, mode = "identical facies") facies = facies_names(s) # returns "sand" "shale" as the two sandy beds are mergeds = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "sand", "shale", "shale"), L_unit = "m") merge_beds(s, mode = "identical facies") facies = facies_names(s) # returns "sand" "shale" as the two sandy beds are merged
number of beds
no_beds(s)no_beds(s)
s |
stratigraphic column (a |
integer, the number of beds
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") no_beds(s) # returns 4s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") no_beds(s) # returns 4
number of distinct facies
no_facies(s)no_facies(s)
s |
stratigraphic column |
an integer
enumerates the facies according to their order of appearance (counting from the bottom of the section). To be applied to stratigraphic columns before get_mom is called. Replaces the facies codes by integer numbers
order_facies_names(s)order_facies_names(s)
s |
stratigraphic column (a |
a stratigraphic column (a stratcol object)
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "clay"), L_unit = "m") s = order_facies_names(s) plot(s)s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "clay"), L_unit = "m") s = order_facies_names(s) plot(s)
wraps around StratigrapheR::litholog() to plot a stratigraphic column. The beds are plotted as polygons, the boundaries as horizontal lines.
## S3 method for class 'stratcol' plot(x, ...)## S3 method for class 'stratcol' plot(x, ...)
x |
stratigraphic column (a |
... |
further plotting options. ignored |
invisible NULL
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c(1,2,3,1.5), L_unit = "m") # facies codes are used as hardness plot(s)s = as_stratcol(c(0.5, 1, 0.3, 0.7), c(1,2,3,1.5), L_unit = "m") # facies codes are used as hardness plot(s)
print stratigraphic column to console
## S3 method for class 'stratcol' print(x, ...)## S3 method for class 'stratcol' print(x, ...)
x |
stratigraphic column (a |
... |
other parameters (currently ignored) |
invisible NULL, prints to the console
summary.stratcol() for a summary of a stratigraphic column
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") print(s)s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") print(s)
replaces old facies names with new ones
rename_facies(s, new_names, old_names = NULL)rename_facies(s, new_names, old_names = NULL)
s |
stratigraphic column (a |
new_names |
new facies names |
old_names |
NULL or a list of old facies names. If NULL, all old facies names will be used |
stratigraphic column (a stratcol object) with renamed facies
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") s = rename_facies(s, new_names = c("sandy", "shaly"))s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") s = rename_facies(s, new_names = c("sandy", "shaly"))
set length unit of strat column
set_L_unit(s, L_unit)set_L_unit(s, L_unit)
s |
stratigraphic column (a |
L_unit |
string or NULL, the length unit |
a stratigraphic column (stratcol object) with length unit added
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale")) s = set_L_unit(s, "m") get_L_unit(s) # returns "m"s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale")) s = set_L_unit(s, "m") get_L_unit(s) # returns "m"
rearrange stratigraphic column
shuffle_col(s, allow_rep = TRUE, max_no_swaps = 10^5)shuffle_col(s, allow_rep = TRUE, max_no_swaps = 10^5)
s |
stratigraphic column (a |
allow_rep |
logical. Are repetitions in facies allowed? |
max_no_swaps |
integer. If allow rep is FALSE, what is the number of permutations used to shuffle the column? |
a stratcol object, the rearranged stratigraphic column
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("clay", "shale", "sand", "shale"), L_unit = "m") s = shuffle_col(s, allow_rep = TRUE) facies_names(s) # returns a random permutation of the faciess = as_stratcol(c(0.5, 1, 0.3, 0.7), c("clay", "shale", "sand", "shale"), L_unit = "m") s = shuffle_col(s, allow_rep = TRUE) facies_names(s) # returns a random permutation of the facies
summarize stratigraphic column
## S3 method for class 'stratcol' summary(object, ...)## S3 method for class 'stratcol' summary(object, ...)
object |
stratigraphic column (a |
... |
further parameters (currently ignored) |
invisible NULL. prints to the console
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m", base = 2) summary(s)s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m", base = 2) summary(s)
get total thickness
total_thickness(s, ...)total_thickness(s, ...)
s |
stratigraphic column (a |
... |
other parameters (currently ignored) |
scalar, total thickness of stratigraphic column
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") total_thickness(s) # returns 2.5s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") total_thickness(s) # returns 2.5
get total thickness of stratigraphic column
## S3 method for class 'stratcol' total_thickness(s, ...)## S3 method for class 'stratcol' total_thickness(s, ...)
s |
stratigraphic column |
... |
other parameters |
scalar, thickness of column
determines the number of facies transitions in a stratigraphic column and stores the output in a matrix
trans_count_matrix(s, ...)trans_count_matrix(s, ...)
s |
stratigraphic column (a |
... |
other parameters. currently ignored |
a transition count matrix of S3 class fa_tran_mat_c
transition_matrix() for the facies transition matrix with transition frequencies
#stratigraphic column with 90 beds s = as_stratcol(thickness = runif(90), facies = rep(c(1,2,3), 30)) m = trans_count_matrix(s)#stratigraphic column with 90 beds s = as_stratcol(thickness = runif(90), facies = rep(c(1,2,3), 30)) m = trans_count_matrix(s)
transition frequency matrix from strat. column
transition_matrix(s)transition_matrix(s)
s |
stratigraphic column (a |
a matrix of S3 class fa_tran_mat (facies transition matrix). Has dimension names "from" and "to", and facies as row/column names.
trans_count_matrix() for the facies transition matrix with raw transition counts
get_mom() to get the Markov order of the transition matrix
return unique facies names from a stratigraphic column
unique_facies_names(s)unique_facies_names(s)
s |
stratigraphic column (a |
a vector of unique facies names in the stratigraphic column
facies_names() to get facies names for each bed
s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") unique_facies = unique_facies_names(s) # returns c("sand", "shale")s = as_stratcol(c(0.5, 1, 0.3, 0.7), c("sand", "shale", "sand", "shale"), L_unit = "m") unique_facies = unique_facies_names(s) # returns c("sand", "shale")