I want to build a basic flowchart with the DiagrammeR package like below. The code chunk below works normally. But when I add "." or "=" then I get
Error: syntax error in line 9 near '->'
working code
library(DiagrammeR)
# A minimal plot
DiagrammeR::grViz("digraph {
graph[layout = dot, rankdir = LR]
BARI_POP4_5_PRIMARY_CN
12
ACR50
BARI_POP4_5_PRIMARY_CN -> 12 -> ACR50
}")
non-working code
library(DiagrammeR)
# A minimal plot
DiagrammeR::grViz("digraph {
graph[layout = dot, rankdir = LR]
population=BARI_POP4_5_PRIMARY_CN.csv
12
ACR50
population=BARI_POP4_5_PRIMARY_CN.csv -> 12 -> ACR50
}")
The result should be like:
but with population=BARI_POP4_5_PRIMARY_CN.csv,12,ACR50 in the positions of a, b and c respectively.