Function to create a frequency profile for a process map.

causal_frequency(
  value = c("absolute", "relative"),
  color_scale = "PuBu",
  color_edges = "dodgerblue4"
)

Arguments

value

The type of frequency value to be used: absolute, relative (percentage of activity instances).

color_scale

Name of color scale to be used for nodes. Defaults to PuBu. See Rcolorbrewer::brewer.pal.info() for all options.

color_edges

The color used for edges. Defaults to dodgerblue4.

Examples

causal_net(L_heur_1,
           type = causal_frequency("relative"))
#> Nodes
#> # A tibble: 7 × 12
#>   act   from_id     n n_dist…¹ bindi…² bindi…³ label color…⁴ shape fontc…⁵ color
#>   <chr>   <int> <dbl>    <dbl> <list>  <list>  <chr>   <dbl> <chr> <chr>   <chr>
#> 1 End         1    40       40 <list>  <list>  "End"    28.8 circ… brown4  brow…
#> 2 Start       2    40       40 <list>  <list>  "Sta…    28.8 circ… chartr… char…
#> 3 a           3    40       40 <list>  <list>  "a\n…    28.8 rect… white   black
#> 4 b           4    21       21 <list>  <list>  "b\n…    15.1 rect… black   black
#> 5 c           5    21       21 <list>  <list>  "c\n…    15.1 rect… black   black
#> 6 d           6    17       13 <list>  <list>  "d\n…    12.2 rect… black   black
#> 7 e           7    40       40 <list>  <list>  "e\n…    28.8 rect… white   black
#> # … with 1 more variable: tooltip <chr>, and abbreviated variable names
#> #   ¹​n_distinct_cases, ²​bindings_input, ³​bindings_output, ⁴​color_level,
#> #   ⁵​fontcolor
#> # ℹ Use `colnames()` to see all variable names
#> Edges
#> # A tibble: 8 × 8
#>   antecedent consequent   dep from_id to_id     n label  penwidth
#>   <chr>      <chr>      <dbl>   <int> <int> <dbl> <chr>     <dbl>
#> 1 e          End        0.976       7     1    40 100%       5   
#> 2 Start      a          0.976       2     3    40 100%       5   
#> 3 a          b          0.917       3     4    21 38.18%     2.53
#> 4 a          c          0.917       3     5    21 38.18%     2.53
#> 5 a          d          0.929       3     6    13 23.64%     1.95
#> 6 b          e          0.917       4     7    21 100%       5   
#> 7 c          e          0.917       5     7    21 100%       5   
#> 8 d          e          0.929       6     7    17 100%       5