R/precedence_matrix_length_two_loop.R
precedence_matrix_length_two_loops.Rd
Construct a precedence matrix counting how often pattern aba
occurs.
precedence_matrix_length_two_loops(eventlog)
The event log object to be used.
m <- precedence_matrix_length_two_loops(hospital_multi_perspective)
print(m)
#> # A tibble: 5 × 3
#> antecedent consequent n
#> <fct> <fct> <int>
#> 1 Check Prepare 1149
#> 2 Check Visit 3478
#> 3 Check Final Visit 1819
#> 4 Check Organize Ambulance 20
#> 5 Check X-Ray 2625
as.matrix(m)
#> consequent
#> antecedent Check End Final Visit Organize Ambulance Prepare Register
#> Check 0 0 1819 20 1149 0
#> End 0 0 0 0 0 0
#> Final Visit 0 0 0 0 0 0
#> Organize Ambulance 0 0 0 0 0 0
#> Prepare 0 0 0 0 0 0
#> Register 0 0 0 0 0 0
#> Start 0 0 0 0 0 0
#> Triage 0 0 0 0 0 0
#> Visit 0 0 0 0 0 0
#> X-Ray 0 0 0 0 0 0
#> consequent
#> antecedent Start Triage Visit X-Ray
#> Check 0 0 3478 2625
#> End 0 0 0 0
#> Final Visit 0 0 0 0
#> Organize Ambulance 0 0 0 0
#> Prepare 0 0 0 0
#> Register 0 0 0 0
#> Start 0 0 0 0
#> Triage 0 0 0 0
#> Visit 0 0 0 0
#> X-Ray 0 0 0 0