I am trying R DiagrammeR library, and can noT add a label for the connectors between boxes... My code (which works fine) is:
library(DiagrammeR)
mermaid("
graph TD
A[node 1]-->B[node 2]
A-->C[node 3]
C-->E[another node]
B-->D[node 4]
")
Using the function grViz of the same library, labels could be added like:
A[label:'This is the NO path"]
but this way gives error in mermaid function... I tried:
A[node 1]-->B[node 2][label="test"]
A[node 1]-->B[node 2, label="test"]
and many others with no success.
I want something similar to this diagramm with the 'YES' added in a connection
Any ideas? Thanks in advance!
Add |Yes|
between A-->
and C[node 3]
.
library(DiagrammeR)
mermaid("
graph TD
A[node 1]--> B[node 2]
A-->|Yes| C[node 3]
C-->E[another node]
B-->D[node 4]
")