View source: R/knowledge-conversions.R
| knowledge_to_caugi | R Documentation |
Converts a Knowledge object to a caugi::caugi object used for plotting.
knowledge_to_caugi(kn)
kn |
A |
A list with the caugi::caugi object alongside information about the knowledge (tiers, required and forbidden edges) that can be used for plotting.
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()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.