inst/roxygen-examples/dot-validate_tier_rule-example.R

# success case: edge goes from child to youth (allowed)
tiers <- tibble::tibble(label = c("child", "youth"))
edges <- tibble::tibble(
  status = "required",
  from = "child_x1",
  to = "youth_x3",
  tier_from = "child",
  tier_to = "youth"
)
.validate_tier_rule(edges, tiers)

# violation case: required edge from youth to child (should error)
edges_bad <- tibble::tibble(
  status = "required",
  from = "youth_x3",
  to = "child_x1",
  tier_from = "youth",
  tier_to = "child"
)
try(.validate_tier_rule(edges_bad, tiers))

Try the causalDisco package in your browser

Any scripts or data that you put into this service are public.

causalDisco documentation built on April 13, 2026, 5:06 p.m.