R/ccao_funs.R
ccao_generate_id.Rd
Memorable IDs are useful for referencing objects with arbitrary versions. This function uses the Docker name generator code to create random memorable IDs using Data Department employee, interns, and fellow names.
ccao_generate_id(n = 1L, prefix = as.character(Sys.Date()))
An n-long character vector of memorable IDs.
# Generate a single ID
ccao_generate_id()
#> [1] "2024-12-06-beautiful-nicole"
# Multiple IDs
ccao_generate_id(10)
#> [1] "2024-12-06-malingering-jacob" "2024-12-06-hopeful-michael"
#> [3] "2024-12-06-fancy-free-rob" "2024-12-06-amazing-kyra"
#> [5] "2024-12-06-cool-ethan" "2024-12-06-quirky-rob"
#> [7] "2024-12-06-quizzical-manasi" "2024-12-06-peaceful-rina"
#> [9] "2024-12-06-sleepy-irene" "2024-12-06-strange-dan"
# IDs with no prefix
ccao_generate_id(3, NULL)
#> [1] "-peaceful-julia" "-footloose-sam" "-hungry-tayun"
# Different prefix for each ID
ccao_generate_id(3, c("type1", "type2", "type3"))
#> [1] "type1-magical-matthew" "type2-laughing-jacob" "type3-festive-carly"