0

I am using DiagrammeR/grViz in R Studio to make a flow chart from left to right. I have included the R code below. This works fine but I would like to align Block 1 to Block 6 with the top so that they are flush at the top.

Any ideas or links to help would be appreciated.

library(DiagrammeR)

grViz("
digraph boxes_and_circles {
graph[rankdir = LR]
  graph [overlap = false, fontsize = 10]
  node[shape = rectangle, style = filled, style = rounded]

  subgraph cluster_0 {
        label = 'BLOCK 1'
  
  node [shape = box,
        fixedsize = true,
        height = 0.7,
        width = 1.2,
        ]
  CS1[label = '1A'];
  CS2[label = '1B'];
  CS3[label = '1C'];
      }
  
      subgraph cluster_1 {
        label = 'BLOCK 2'
  node [shape = circle,
        fixedsize = true,
        width = 1.2,
        ] // sets as circles
 CR1[label = '2A'];
 CR2[label = '2B'];
      }
 
     subgraph cluster_3 {
        label = 'BLOCK 4'
 node [shape = box,
        fixedsize = true,
        height = 0.7,
        width = 1.2,
        ]
 RM1; RM2;
 RM1[label = '4A'];
 RM2[label = '4B'];
      }
  
      subgraph cluster_5 {
        label = 'BLOCK 6'
 
 node [shape = box,
        fixedsize = true,
        height = 0.7,
        width = 1.2,
        ]
 R1[label = '6A'];
 R2[label = '6B'];
 R3[label = '6C'];
      }

  CS1->CR1->RM1->R1
  CS1->          R1
  CS2->CR2->RM2->R1
  CS1->CR2
  CS3->               R3
}
")
rustymarmot
  • 111
  • 1
  • 10

0 Answers0