make_labels {Claddis} | R Documentation |
Make unique text labels
Description
Given a requisite number, generates that many unique text labels.
Usage
make_labels(N)
Arguments
N |
The number of labels required, |
Details
Where a list of unique text labels are required (i.e., where simple numbering will not suffice) it can be useful to have a simple function that generates the required amount.
In practice, this is simple in R when N is 26 or less as the LETTERS
object can be used for this purpose. For example, to get ten unique labels:
LETTERS[1:10]
This function works in a similar way but will add a second, third etc. letter where the value of N requires it.
Value
A character vector of N unique labels.
Author(s)
Graeme T. Lloyd graemetlloyd@gmail.com
Examples
# Make 40 unique text labels:
make_labels(N = 40)
[Package Claddis version 0.7.0 Index]