Replaces occurrences of unique values within a name with their first three
characters. This function is useful for abbreviating long condition names
in a dataset.
Usage
shorten_names(name, unique_values)
Arguments
- name
A string representing the name to be shortened.
- unique_values
A vector of unique values whose abbreviations will
replace their occurrences in the name.
Value
A string with the unique values replaced by their abbreviations.