Once I learned to use single quotes I found it surprisingly easy to produce diagrams using GraphViz https://en.wikipedia.org/wiki/Graphviz, R package DiagrammeR http://rich-iannone.github.io/DiagrammeR/ and R Markdown http://rmarkdown.rstudio.com.
library(DiagrammeR)
## Warning: package 'DiagrammeR' was built under R version 3.3.2
grViz("
digraph EMfit{
Old [label='Current Parameters']
Weights [label='Observation Weights']
Statistics [label='Estimated Sufficient Statistics']
New [label='Updated Parameters']
Old->Weights [label=' Bayes Rule', fontcolor=darkgreen]
Weights->Statistics [label=' Weighted Sums', fontcolor=darkgreen]
Statistics->New [label=' Componentwise ML', fontcolor=darkgreen]
New->Old [label=' Loop', fontcolor=darkgreen]
}
")
grViz("
digraph CancerMM{
One [label='Mixture Component']
A [label='<f0> D-2 |<f1> History', shape=record, color=red]
B [label='<f0> C |<f1> Age', shape=record, color=blue]
C [label='<f0> C |<f1> Weight', shape=record, color=blue]
D [label='BloodP']
E [label='<f0> C |<f1> Sys', shape=record, color=blue]
F [label='<f0> C |<f1> Dia', shape=record, color=blue]
G [label='<f0> D-7 |<f1> ECG', shape=record, color=red]
H [label='<f0> C |<f1> Haem', shape=record, color=blue]
I [label='<f0> D-3 |<f1> Bed', shape=record, color=red]
J [label='<f0> C |<f1> Tsize', shape=record, color=blue]
K [label='<f0> C |<f1> Tgrade', shape=record, color=blue]
L [label='<f0> C |<f1> Acid', shape=record, color=blue]
M [label='<f0> D-2 |<f1> bMeta', shape=record, color=red]
N [label='Frail']
P [label='b.H.W.']
One->A
One->D
One->G
One->J
One->K
One->L
One->N
One->P
D->E
E->F
F->E
N->I
I->B
B->I
P->M
C->H
H->C
H->M
M->H
M->C
C->M
}
")