make.unique improvement

make_unique(vec, sep = "_")

Arguments

vec

a vector

sep

char separator to use

Value

a vector

Examples


make_unique(c("a","a","a","b","a","b","c"))
#> [1] "a"   "a_2" "a_3" "b"   "a_4" "b_2" "c"