Description Usage Arguments Author(s) Examples
Create a sentence style identifier. This uses the approach described by Asana on their blog https://blog.asana.com/2011/09/6-sad-squid-snuggle-softly/. This approach encodes 32 bits of information (so 2^32 ~= 4 billion possibilities) and in theory can be remapped to an integer if you really wanted to.
1 2 3 4 5 6 7 |
n |
number of ids to return. If |
style |
Style to join words with. Can be one of "Pascal", "camel", "snake", "kebab", "dot", "title", "sentence", "lower", "upper", "constant" or "spongemock" |
past |
Use the past tense for verbs (e.g., slurped or jogged rather than slurping or jogging) |
global |
Use global random number generator that responds to
|
use_openssl |
Use openssl for random number generation when using a non-global generator (see random_id for details) |
Rich FitzJohn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Generate an identifier
ids::sentence()
# Generate a bunch
ids::sentence(10)
# As with adjective_animal, use "style" to control punctuation
ids::sentence(style = "Camel")
ids::sentence(style = "dot")
ids::sentence(style = "Title")
# Change the tense of the verb:
set.seed(1)
ids::sentence()
set.seed(1)
ids::sentence(past = TRUE)
# Pass n = NULL to bind arguments to a function
id <- ids::sentence(NULL, past = TRUE, style = "dot")
id()
id(10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.