as_dot() renders the component-labelled structural graph as a Graphviz
DOT string: one edge per typed edge (from -> to), with the distributional
component (mu, sigma, zi, ...) as the edge label. Non-mean paths are
dashed and greyed so a sigma / zi arrow reads differently from a mean
arrow. Unlike as_lavaan(), DOT keeps every component path — nothing is
dropped.
Usage
as_dot(object, ...)
# S3 method for class 'drm_sem'
as_dot(object, ...)
# S3 method for class 'drm_dag'
as_dot(object, ...)Value
A length-1 character string of class drm_dot (its print method
cat()s the DOT source). Pipe it to Graphviz (dot -Tpng) or
DiagrammeR::grViz() to render.
Examples
dag <- drm_dag(size ~ temp, abundance ~ size + temp)
as_dot(dag)
#> digraph drmSEM {
#> rankdir=LR;
#> node [shape=box, style=rounded];
#> "size";
#> "abundance";
#> "temp";
#> "temp" -> "size" [label="mu"];
#> "size" -> "abundance" [label="mu"];
#> "temp" -> "abundance" [label="mu"];
#> }