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 x 10 #> act from_id bindings_input bindings_output label color_level shape #> <chr> <int> <list> <list> <chr> <dbl> <chr> #> 1 a 1 <int [1]> <int [1]> "a\n0 mins" 0 rectang~ #> 2 a 1 <int [1]> <int [1]> "a\n0 mins" 0 rectang~ #> 3 a 1 <int [1]> <int [1]> "a\n0 mins" 0 rectang~ #> 4 a 1 <int [1]> <int [1]> "a\n0 mins" 0 rectang~ #> 5 b 2 <int [1]> <int [1]> "b\n0 mins" 0 rectang~ #> 6 c 3 <int [1]> <int [1]> "c\n0 mins" 0 rectang~ #> 7 d 4 <int [1]> <int [1]> "d\n0 mins" 0 rectang~ #> 8 e 5 <int [1]> <int [1]> "e\n0 mins" 0 rectang~ #> 9 e 5 <int [1]> <int [1]> "e\n0 mins" 0 rectang~ #> 10 e 5 <int [1]> <int [1]> "e\n0 mins" 0 rectang~ #> 11 e 5 <int [1]> <int [1]> "e\n0 mins" 0 rectang~ #> # ... with 3 more variables: fontcolor <chr>, color <chr>, tooltip <chr> #> Edges #> # A tibble: 8 x 10 #> antecedent consequent dep from_id to_id n value label_numeric label #> <chr> <chr> <dbl> <int> <int> <dbl> <dbl> <dbl> <chr> #> 1 Start a 0.976 7 1 40 0 0 " " #> 2 a b 0.917 1 2 21 1.48 1.48 "1.48 min~ #> 3 a c 0.917 1 3 21 1.48 1.48 "1.48 min~ #> 4 a d 0.929 1 4 13 1 1 "1 mins" #> 5 b e 0.917 2 5 21 1.48 1.48 "1.48 min~ #> 6 c e 0.917 3 5 21 1.48 1.48 "1.48 min~ #> 7 d e 0.929 4 5 17 1.29 1.29 "1.29 min~ #> 8 e End 0.976 5 6 40 0 0 " " #> # ... with 1 more variable: penwidth <dbl>