Different activity sequences in the log can be visualized with trace_explorer(). With the type argument,
it can be used to explore frequent as well as infrequent traces. The coverage argument specificies how much of the
log you want to explore. By default it is set at 0.2, meaning that it will show the most (in)frequency traces
covering 20% of the log.
trace_explorer(
log,
coverage = NULL,
n_traces = NULL,
type = c("frequent", "infrequent"),
coverage_labels = c("relative", "absolute", "cumulative"),
abbreviate = TRUE,
show_labels = TRUE,
label_size = 3,
scale_fill = bupaR::scale_fill_discrete_bupaR,
raw_data = FALSE,
plotly = FALSE,
eventlog = deprecated(),
.abbreviate = deprecated()
)# S3 method for eventlog
trace_explorer(
log,
coverage = NULL,
n_traces = NULL,
type = c("frequent", "infrequent"),
coverage_labels = c("relative", "absolute", "cumulative"),
abbreviate = TRUE,
show_labels = TRUE,
label_size = 3,
scale_fill = bupaR::scale_fill_discrete_bupaR,
raw_data = FALSE,
plotly = FALSE,
eventlog = deprecated(),
.abbreviate = deprecated()
)
# S3 method for activitylog
trace_explorer(
log,
coverage = NULL,
n_traces = NULL,
type = c("frequent", "infrequent"),
coverage_labels = c("relative", "absolute", "cumulative"),
abbreviate = TRUE,
show_labels = TRUE,
label_size = 3,
scale_fill = bupaR::scale_fill_discrete_bupaR,
raw_data = FALSE,
plotly = FALSE,
eventlog = deprecated(),
.abbreviate = deprecated()
)
log: Object of class log or derivatives (eventlog
or activitylog).
numeric (default 0.2): The percentage coverage of the trace to explore. Defaults to 0.2 (0.05) most (in)frequent.
integer: Instead of setting coverage, an exact number of traces can be set. Should be an integer larger than 0.
character (default "frequent"): "frequent" traces first, or "infrequent" traces first?
character (default "relative"): Change the labels to be shown on the right of the process variants.
These can be "relative" frequency (default), "absolute", or "cumulative". Multiple labels can be selected at the same time.
logical (default TRUE): If TRUE, abbreviate activity labels.
logical (default TRUE): If FALSE, activity labels are not shown.
numeric (default 3): Font size of labels.
ggplot2 scale function (default scale_fill_discrete_bupaR):
Set color scale. Defaults to scale_fill_discrete_bupaR. Replaced with scale_fill_discrete when more than 26 activities are present.
logical (default FALSE): Return raw data instead of graph.
logical (default FALSE): Return a plotly object, instead of a ggplot2.
trace_explorer(eventlog): Trace explorer for an eventlog.
trace_explorer(activitylog): Trace explorer for an activitylog.
library(processmapR)
library(eventdataR)
patients %>%
trace_explorer(coverage = 0.8)
Run the code above in your browser using DataLab