adjective_animal: Ids based on a number of adjectives and an animal

Description Usage Arguments Details Author(s) Examples

Description

Ids based on a number of adjectives and an animal

Usage

1
2
adjective_animal(n = 1, n_adjectives = 1, style = "snake",
  max_len = Inf)

Arguments

n

number of ids to return. If NULL, it instead returns the generating function

n_adjectives

Number of adjectives to prefix the anmial with

style

Style to join words with. Can be one of "Pascal", "camel", "snake", "kebab", "dot", "title", "sentence", "lower", "upper", and "constant".

max_len

The maximum length of a word part to include (this may be useful because some of the names are rather long. This stops you generating a hexakosioihexekontahexaphobic_queenalexandrasbirdwingbutterfly). A vector of length 2 can be passed in here in which case the first element will apply to the adjectives (all of them) and the second element will apply to the animals.

Details

The list of adjectives and animals comes from https://github.com/a-type/adjective-adjective-animal, and in turn from gfycat.com

Author(s)

Rich FitzJohn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Generate a random identifier:
adjective_animal()

# Generate a bunch all at once:
adjective_animal(5)

# Control the style of punctuation with the style argument:
adjective_animal(style = "lower")
adjective_animal(style = "CONSTANT")
adjective_animal(style = "camel")
adjective_animal(style = "kebab")

# Control the number of adjectives used
adjective_animal(n_adjectives = 3)

# This can get out of hand quickly though:
adjective_animal(n_adjectives = 7)

# Limit the length of adjectives and animals used:
adjective_animal(10, max_len = 6)

# The lengths can be controlled for adjectives and animals
# separately, with Inf meaning no limit:
adjective_animal(10, max_len = c(6, Inf), n_adjectives = 2)

# Pass n = NULL to bind arguments to a function
id <- adjective_animal(NULL, n_adjectives = 2, style = "dot", max_len = 6)
id()
id(10)

Example output

[1] "microclimatic_limpet"
[1] "loathful_capybara"        "foliaceous_elkhound"     
[3] "censorian_galah"          "quasihistorical_aardvark"
[5] "multilinear_borzoi"      
[1] "handwoven wryneck"
[1] "VACANT_HORSEFLY"
[1] "smartaleckyHochstettersfrog"
[1] "extraterritorial-galapagospenguin"
[1] "disingenuous_unluxuriant_atrophied_xuanhanosaurus"
[1] "preobjective_moderate_weakwilled_unamiable_westernmost_extravertive_kilted_cicada"
 [1] "sure_gecko"    "taxing_scarab" "couped_gelada" "fleecy_bluet" 
 [5] "postal_dassie" "black_mice"    "normal_pooch"  "grave_carp"   
 [9] "drowsy_smelts" "carbon_takin" 
 [1] "weird_former_yak"               "livid_like_tigershark"         
 [3] "crass_bleak_bactrian"           "wild_burly_frigatebird"        
 [5] "giddy_sacred_jenny"             "dorky_formal_blackfootedferret"
 [7] "braced_rubber_kingfisher"       "idle_gentle_vole"              
 [9] "inland_mid_nymph"               "noir_droll_humpbackwhale"      
[1] "cheeky.slimy.asp"
 [1] "frowsy.oniony.hen"   "canine.former.cur"   "chuffy.drafty.racer"
 [4] "scary.looney.gaur"   "lapis.livid.bobcat"  "dusky.usual.borzoi" 
 [7] "goodly.craven.heron" "vile.medium.bat"     "weedy.tired.paca"   
[10] "fatty.bumpy.urchin" 

ids documentation built on May 2, 2019, 2:08 a.m.