Learn R Programming

daqapo (version 0.3.2)

detect_similar_labels: Search for similar labels in a column

Description

Function that tries to detect spelling mistakes in a given activity log column

Usage

detect_similar_labels(
  activitylog,
  column_labels,
  max_edit_distance,
  show_NA,
  ignore_capitals,
  filter_condition
)

Value

tbl_df providing an overview of similar labels for the indicated column

Arguments

activitylog

The activity log

column_labels

The name of the column(s) in which to search for spelling mistakes

max_edit_distance

The maximum number of insertions, deletions and substitutions that are allowed to be executed in order for two strings to be considered similar.

show_NA

A boolean indicating if labels that do not show similarities with others should be shown in the output

ignore_capitals

A boolean indicating if capitalization should be included or excluded when calculating the edit distance between two strings

filter_condition

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

Examples

Run this code
# \donttest{
data("hospital_actlog")
detect_similar_labels(activitylog = hospital_actlog,
     column_labels = "activity",
     max_edit_distance = 3)
# }

Run the code above in your browser using DataLab