knowledge_to_caugi: Convert Knowledge to Caugi

View source: R/knowledge-conversions.R

knowledge_to_caugiR Documentation

Convert Knowledge to Caugi

Description

Converts a Knowledge object to a caugi::caugi object used for plotting.

Usage

knowledge_to_caugi(kn)

Arguments

kn

A Knowledge object.

Value

A list with the caugi::caugi object alongside information about the knowledge (tiers, required and forbidden edges) that can be used for plotting.

See Also

Other knowledge functions: +.Knowledge(), add_exogenous(), add_tier(), add_to_tier(), add_vars(), as_bnlearn_knowledge(), as_pcalg_constraints(), as_tetrad_knowledge(), convert_tiers_to_forbidden(), deparse_knowledge(), forbid_edge(), get_tiers(), knowledge(), remove_edge(), remove_tiers(), remove_vars(), reorder_tiers(), reposition_tier(), require_edge(), seq_tiers(), unfreeze()

Examples

data(tpc_example)
kn <- knowledge(
  tpc_example,
  tier(
    child ~ starts_with("child"),
    youth ~ starts_with("youth"),
    old ~ starts_with("old")
  ),
  child_x1 %-->% youth_x3,
  child_x2 %!-->% youth_x3
)
cg <- knowledge_to_caugi(kn)


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