Function that lists all distinct combinations of the given columns in the activity log

detect_unique_values(activitylog, column_labels, filter_condition = NULL)

Arguments

activitylog

The activity log

column_labels

The names of columns in the activity log for which you want to show the different combinations found in the log. If only one column is provided, this results in a list of unique values in that column.

filter_condition

Condition that is used to extract a subset of the activity log prior to the application of the function

Value

activitylog containing the unique (distinct) values (combinations) in the indicated column(s)

Examples

# \donttest{ data("hospital_actlog") detect_unique_values(activitylog = hospital_actlog, column_labels = "activity")
#> *** OUTPUT ***
#> Distinct entries are computed for the following columns: #> activity
#> # A tibble: 9 x 1 #> activity #> <chr> #> 1 registration #> 2 Registration #> 3 Triage #> 4 Clinical exam #> 5 Trage #> 6 Treatment #> 7 Triaga #> 8 Treatment evaluation #> 9 0
detect_unique_values(activitylog = hospital_actlog, column_labels = c("activity", "originator"))
#> *** OUTPUT ***
#> Distinct entries are computed for the following columns: #> activity - originator
#> # A tibble: 22 x 2 #> activity originator #> <chr> <chr> #> 1 registration Clerk 9 #> 2 Registration Clerk 12 #> 3 Triage Nurse 27 #> 4 Clinical exam Doctor 7 #> 5 Triage Nurse 17 #> 6 Registration Clerk 6 #> 7 Registration Clerk 9 #> 8 Trage Nurse 17 #> 9 Clinical exam Doctor 4 #> 10 Registration Clerk 3 #> # ... with 12 more rows
# }