Function to create a performance profile for a causal map.

causal_performance(
  FUN = mean,
  units = c("mins", "secs", "hours", "days", "weeks", "months", "quarters", "semesters",
    "years"),
  color_scale = "Reds",
  color_edges = "red4",
  ...
)

Arguments

FUN

A summary function to be called on the process time of a specific activity, e.g. mean, median, min, max

units

The time unit in which processing time should be presented (mins, hours, days, weeks, months, quarters, semesters, years. A month is defined as 30 days. A quarter is 13 weeks. A semester is 26 weeks and a year is 365 days

color_scale

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

color_edges

The color used for edges. Defaults to red4.

...

Additional arguments forwarded to FUN

Examples

causal_net(L_heur_1,
           type = causal_performance())
#> Nodes
#> # A tibble: 11 × 10
#>    act   from_id bindings_in…¹ bindi…² label color…³ shape fontc…⁴ color tooltip
#>    <chr>   <int> <list>        <list>  <chr>   <dbl> <chr> <chr>   <chr> <chr>  
#>  1 a           3 <int [1]>     <int>   "a\n…       0 rect… black   grey  "Input…
#>  2 a           3 <int [1]>     <int>   "a\n…       0 rect… black   grey  "Input…
#>  3 a           3 <int [1]>     <int>   "a\n…       0 rect… black   grey  "Input…
#>  4 a           3 <int [1]>     <int>   "a\n…       0 rect… black   grey  "Input…
#>  5 b           4 <int [1]>     <int>   "b\n…       0 rect… black   grey  "Input…
#>  6 c           5 <int [1]>     <int>   "c\n…       0 rect… black   grey  "Input…
#>  7 d           6 <int [1]>     <int>   "d\n…       0 rect… black   grey  "Input…
#>  8 e           7 <int [1]>     <int>   "e\n…       0 rect… black   grey  "Input…
#>  9 e           7 <int [1]>     <int>   "e\n…       0 rect… black   grey  "Input…
#> 10 e           7 <int [1]>     <int>   "e\n…       0 rect… black   grey  "Input…
#> 11 e           7 <int [1]>     <int>   "e\n…       0 rect… black   grey  "Input…
#> # … with abbreviated variable names ¹​bindings_input, ²​bindings_output,
#> #   ³​color_level, ⁴​fontcolor
#> Edges
#> # A tibble: 8 × 10
#>   antecedent consequent   dep from_id to_id     n value label_nu…¹ label penwi…²
#>   <chr>      <chr>      <dbl>   <int> <int> <dbl> <dbl>      <dbl> <chr>   <dbl>
#> 1 e          End        0.976       7     1    40  0          0    " "      1   
#> 2 Start      a          0.976       2     3    40  0          0    " "      1   
#> 3 a          b          0.917       3     4    21  1.48       1.48 "1.4…    5   
#> 4 a          c          0.917       3     5    21  1.48       1.48 "1.4…    5   
#> 5 a          d          0.929       3     6    13  1          1    "1 m…    3.71
#> 6 b          e          0.917       4     7    21  1.48       1.48 "1.4…    5   
#> 7 c          e          0.917       5     7    21  1.48       1.48 "1.4…    5   
#> 8 d          e          0.929       6     7    17  1.29       1.29 "1.2…    4.51
#> # … with abbreviated variable names ¹​label_numeric, ²​penwidth