strg_prune: Remove redundant relations from a stratigraph

View source: R/strat_prune.R

strg_pruneR Documentation

Remove redundant relations from a stratigraph

Description

strg_prune() removes redundant relations from a stratigraphic graph by computing its transitive reduction. The result is a 'pruned' graph that follows Harris' "Law of Stratigraphical Succession": that only the uppermost and undermost relations are significant when placing a unit in a stratigraphic sequence.

Usage

strg_prune(strg)

Arguments

strg

A stratigraph() object to prune.

Value

A stratigraph with redundant relations removed.

Examples


bushy_stratigraphy <- stratigraph(
  tibble::tibble(
    id = letters[1:5],
    above = list(NA, "a", "a", c("a", "b", "c"), c("a", "c", "d"))
  ),
  "id", "above"
)

strg_prune(bushy_stratigraphy)

joeroe/stratigraphr documentation built on May 17, 2023, 9:52 p.m.