Skip to content
Prev 7070 / 7420 Next

Issues when plotting with DiagrammeR

Hi,

I'm not familiar with DiagrammeR, but it looks like the mermaid()
function expects correct mermaid code.

Yours has multiple errors, including misplaced spaces between arrow
and node and unmatching parentheses around the right-hand nodes. Try
it with

graph LR
G((proximity))--0.13-->B((Move away))
G((proximity))--0.03-->C((Approach))
G((proximity))--0.08-->H((Explore))
G((proximity))--0.28-->D((Bite))
G((proximity))--0.18-->A((Orientation))
G((proximity))--0.02-->E((Chase))
G((proximity))--0.26-->I((Feeding))

instead.

I tried your code at https://mermaid.live and it failed, but the
edited version works.

Sarah



On Thu, Apr 24, 2025 at 12:36?AM Luis Fernando Garc?a
<luysgarcia at gmail.com> wrote: