Dear all,
When trying to build this plot just the a circle with the first name and
the rest is just a copy of the code. I wanted to know how could I correct
this part since it happens some times with this package.
Thanks in advance.
This is the code
library(DiagrammeR)
mermaid("
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))
")
Issues when plotting with DiagrammeR
2 messages · Luis Fernando García, Sarah Goslee
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:
Dear all,
When trying to build this plot just the a circle with the first name and
the rest is just a copy of the code. I wanted to know how could I correct
this part since it happens some times with this package.
Thanks in advance.
This is the code
library(DiagrammeR)
mermaid("
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))
")
[[alternative HTML version deleted]]
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Sarah Goslee (she/her) https://www.numberwright.com