It adds sequential numbers to solve duplicates in a character vector.
Usage
fix_duplicated(x, zeros = TRUE, NA_as_character = FALSE)
Arguments
- x
a character vector.
- zeros
logical. Should leading zero be added?
- NA_as_character
logical. If FALSE, the missing values will not be affected by this function, if TRUE, any missing values duplicated will be considered as a character "NA".
Value
a single character with duplicated solved, thus with only unique elements.