Skip to contents

Creates unique identifiers by combining random adjectives with Pokemon names in different formats.

Usage

dexid(
  n,
  n_adj = 1,
  gen = 1:9,
  case = c("snake", "kebab", "camel", "caps", "sentence", "custom"),
  add_digits = FALSE,
  ...
)

Arguments

n

An integer. Number of IDs to generate.

n_adj

An integer. Number of adjectives to use. Defaults to 1.

gen

vector of integers. The generations of Pokemon to use. Defaults to all generations.

case

Character string. The case style to use. Supported cases are snake, kebab, camel, caps, sentence and custom. If case is set to custom, a delimiter argument must be provided.

add_digits

Logical. If TRUE, adds a random digit to the end of each ID. Defaults to FALSE.

...

If case is set to custom, a delimiter argument must be provided.

Value

A character vector of length n containing the generated IDs.

Examples

# Generate 5 basic snake_case IDs
dexid(5)
#> [1] "complete_inkay"    "unlined_chewtle"   "advanced_snivy"   
#> [4] "strong_ledyba"     "competent_linoone"

# Generate 5 IDs with 2 adjectives for more uniqueness
dexid(5, n_adj = 2)
#> [1] "long_mortified_wishiwashi"   "pricey_intrepid_solosis"    
#> [3] "self-assured_wise_ribombee"  "bubbly_precious_basculegion"
#> [5] "large_glass_ogerpon"        

# Generate 5 kebab Case IDs
dexid(5, case = "kebab")
#> [1] "unsteady-buzzwole" "chief-thievul"     "smooth-dewott"    
#> [4] "ample-lotad"       "blank-silvally"   

# Generate 5 IDs with a custom delimiter
dexid(5, case = "custom", delimiter = "|")
#> [1] "naughty|tatsugiri"  "practical|vigoroth" "acrobatic|umbreon" 
#> [4] "shady|corviknight"  "infinite|gliscor"  

# Generate 5 IDs with random digits
dexid(5, add_digits = TRUE)
#> [1] "idle_morpeko_6131"         "glittering_hitmontop_4513"
#> [3] "physical_seismitoad_5426"  "worthy_granbull_4479"     
#> [5] "royal_roserade_0144"      

# Generate 5 IDs restrict to specific generation(s)
dexid(5, gen = 1)
#> [1] "mysterious_butterfree" "disfigured_jigglypuff" "fruitful_omastar"     
#> [4] "useless_golbat"        "luxurious_wigglytuff"