Generates random character string composed of lower and upper case letters with an option to include digits.

util_rand_str(characters = 8L, digits = FALSE, ext = NULL)

Arguments

characters

Integer. Number of characters.

digits

Logical. Use digits.

ext

Character string. Optional file extension.

Details

To ensure that the character string generated is a valid R variable name, the first character will always be a lower case or upper case letter when digits = TRUE.

Author

Ivan Jacob Agaloos Pesigan

Examples

util_rand_str(characters = 8L, ext = "R")
#> [1] "qZvEafHY.R"