Chapter 2 Introduction

tb <- tibble(a=c(1, 2, 3), b=c(4, 5, 6))
tb
## # A tibble: 3 × 2
##       a     b
##   <dbl> <dbl>
## 1     1     4
## 2     2     5
## 3     3     6

2.1 Diagram testing

DiagrammeR::grViz("
digraph G {
  graph [layout = dot]
  node [shape = folder, style = filled, margin=0, height=0.1]

  node [fillcolor = lightblue]
  a [label = '111111']
  
  node [fillcolor = Beige]
  b [label = '2222']
  c [label = '333333']
  d [label = '444']
  
  node [fillcolor = mediumpurple1]
  e [label = '5']
  f [label = '6']
  g [label = '7']
  
  node [fillcolor = darkseagreen1]
  h [label = '8']
  i [label = '9']


  subgraph cluster1 {
    # node [fixedsize = true, width = 3]
    b -> {c d}
  }
  
  subgraph cluster2 {
    # node [fixedsize = true, width = 3]
    e -> f -> g -> e
  }
  
  subgraph cluster3 {
    # node [fixedsize = true, width = 3]
    h
    i
  }

  a -> b 
  a -> e
  f -> i
  e -> h

}
")