How to plot a mermaid figure using DiagrammeR?

68 views Asked by At

Let's say, I want to plot this diagram using ``:

sequenceDiagram
    Alice->>+John: Hello John, how are you?
    Alice->>+John: John, can you hear me?
    John-->>-Alice: Hi Alice, I can hear you!
    John-->>-Alice: I feel great!

When you visit the online mermaid.live page (the above code and its plot is already plotted), we see that the expected plot is shown:

enter image description here

I want to reproduce the same figure in R, using DiagrammeR:

library(DiagrammeR)

mermaid("sequenceDiagram
    Alice->>+John: Hello John, how are you?
    Alice->>+John: John, can you hear me?
    John-->>-Alice: Hi Alice, I can hear you!
    John-->>-Alice: I feel great!")

enter image description here

As we can see, I do not get the expected figure.

0

There are 0 answers