powered by
Append numbers to duplicate values to ensure all are unique
make_unique( x, sep = " ", wrap_in_brackets = TRUE, warn_about_type_conversion = TRUE )
x but duplicated values are de-duplicated by adding a number corresponding to the order in which duplicates appear
vector to de-duplicate
string separating (string)
should the number indicating order of duplicated elements be wrapped in round brackets? (flag)
should the function warn user if input type is converted to 'character' in output (flag)
Differs from 'make.unique' in base R by starting suffixes at 1 and allowing users to customize suffix format.
make_unique(c('bob', 'billy', 'bob', 'bob'))
Run the code above in your browser using DataLab