h_unique_labels: Creation of Unique Labels

View source: R/GeneSpec-class.R

h_unique_labelsR Documentation

Creation of Unique Labels

Description

This helper function generates a set of unique labels given unique IDs and not necessarily unique names.

Usage

h_unique_labels(ids, nms = NULL)

Arguments

ids

(character or NULL)
unique IDs.

nms

(character or NULL)
not necessarily unique names if provided.

Value

Character vector where empty names are replaced by the IDs and non-unique names are made unique by appending the IDs in parentheses.

Examples

h_unique_labels(c("1", "2", "3"), c("A", "B", "A"))
h_unique_labels(NULL)
h_unique_labels(c("1", "2", "3"))

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.