It might happen that there are duplicated strings in a list. With this function we will rename those duplicated entries in a way that we simply add the number of occurrences to the string. I.e., when the string foo occurs three times in a list, it will be renamed to foo_1, foo_2, and foo_3, respectively.
List of strings where duplicates should be renamed
List where duplicates are renamed.
l <- c( "foo", "bar", "foo", "bars") rename_duplicates( l)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.