How can I change the kind of arrow on a Diagrammer graph? I want to mix them on the same graph.
Toy example:
library(data.table)
niv <- c("A","B","C","D","E","X","Y")
from <- c("A","A","A","A","B","C","D","E", "X", "B")
to <- c("B","C","D","E","X","X","Y","Y","Y", "C")
temp <- data.table(from=factor(from, levels=niv),
to=factor(to,levels=niv), col=c(rep("blue",5), rep("black",5)))
nodes <- create_node_df( n=length(niv), label=niv, width=0.3)
edges <- create_edge_df(from = temp$from, to = temp$to,
rel = "leading_to", label=temp$from, color=temp$col)
graph <- create_graph( nodes_df = nodes, edges_df = edges)
render_graph(graph)
Now all arrows are defined as rel = "leading_to". I'm not able to find on the documentation what other options I can use.
I would like to link that parameter to a new column on my datatable specifying if I want a "to" arrow, a "from" arrow, or just paint a line without arrow.
What are the options for arrows with a tail but without head? And for a simple line without arrowhead?
I've found a way with the parameter
arrowhead = myvector
Where my vector has elements "none" and/or "normal". That allows me to supress some arrows. Other interesting options are inv or crow. https://rich-iannone.github.io/DiagrammeR/articles/graphviz-mermaid.html
Maybe there is also an option for the parameter rel but I'm not able to find it.