To allow unique reference to constructs, they require unique identifiers. These functions generate such identifiers by combining one or more identifier prefixes (usually a human-readable construct name such as 'attitude') with a unique identifier based on the second the identifier was generated. The identifier prefix may only contain lowercase and uppercase letters and underscores.
An identifier prefix.
Whether to base::stop()
or produce a base::warning()
when encountering illegal characters (i.e. anything other than a letter or
underscore).
A vector of identifier prefixes.
a character vector containing the identifier(s).
generate_id('attitude');
#> [1] "attitude_7lyrwg2x"