% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{rename_duplicates}
\alias{rename_duplicates}
\title{Make a list of strings unique}
\usage{
rename_duplicates(names)
}
\arguments{
\item{names}{List of strings where duplicates should be renamed}
}
\value{
List where duplicates are renamed.
}
\description{
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.
}
\examples{
l <- c("foo", "bar", "foo", "bars")
rename_duplicates(l)
}