Learn R Programming

causalDisco (version 1.0.1)

knowledge_to_caugi: Convert Knowledge to Caugi

Description

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

Usage

knowledge_to_caugi(kn)

Value

A list with the caugi::caugi object alongside information.

Arguments

kn

A knowledge object.

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

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

Run the code above in your browser using DataLab