rename.duplicate | 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 |
TRUE to print informative messages, FALSE otherwise. |
A list with items:
new.x: new strings (without duplicates).
duplicated.x: strings which were originally duplicated.
nn <- sample(letters[1:10], 30, replace=TRUE) table(nn) rename.duplicate(x=nn, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.