gen_uniq_lbls-deprecated | R Documentation |
This function generates unique labels for an input vector by adding a count to labels of which multiple occurrences are found.
gen_uniq_lbls(lbls, sep_char = " ")
lbls |
A vector of labels for which to generate unique names. |
sep_char |
A (combination of) characters with which to separate labels and their unique counts. |
A factor of unique labels.
fantaxtic-deprecated
lbls <- as.character(c("A", "B", "B", "C", "C", "C", "D"))
gen_uniq_lbls(lbls)
gen_uniq_lbls(lbls, sep_char = "_")
#Also works with factors or numerics
gen_uniq_lvls(as.factor(lbls))
lbls <- as.numeric(c(1, 2, 2, 3, 3, 3, 4))
gen_uniq_lbls(lbls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.