make_unique: Ensure all entries in a string are uniquely labeled

View source: R/make_unique.r

make_uniqueR Documentation

Ensure all entries in a string are uniquely labeled

Description

Leaves entries untouched if they are already unique; adds a suffix like '_1', etc. if necessary.

Usage

make_unique(x, sep = "_")

Arguments

x

A character vector or something coerceable to a character vector.

sep

Separator between label and suffix. Default: _.

Examples

make_unique(LETTERS[c(1,1,2,2,2,3,4)])


pbreheny/breheny documentation built on March 30, 2024, 7:37 p.m.