Given a dataframe with an identifier variable, returns the same dataframe with a different letter appended to repeat values of that variable.
a dataframe with an identifier that needs to be made unique.
a character column in that dataframe to be altered so that all values in it are unique.
Some authors will produce more than one book (or other bibliography item) in a particular year. When two or more such items are present, this function will add a letter to the end of the date, starting at 'a' and cycling through the (English) alphabet. It'll do this to any character variable, but this will result in silly outcomes unless the last part of the string is a year.
a dataframe identical to the one supplied to the function but with the identifier variable altered so that repeats of a given value are now distinguished by a letter appended to the string (e.g. if 'Smith 2010' appears twice in the original, there will now be a 'Smith 2010a' and a 'Smith 2010b'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.