rename.duplicate {genefu} | R Documentation |
This function renames duplicated strings by adding their number of occurrences at the end.
rename.duplicate(x, sep = "_", verbose = FALSE)
x |
vector of strings. |
sep |
a character to be the separator between the number added at the end and the string itself. |
verbose |
|
new.x |
new strings (without duplicates). |
duplicated.x |
strings which were originally duplicated. |
Benjamin Haibe-Kains
nn <- sample(letters[1:10], 30, replace=TRUE) table(nn) rename.duplicate(x=nn, verbose=TRUE)