ids: Generic id generating function

Description Usage Arguments Value Author(s) Examples

View source: R/ids.R

Description

Generic id generating function

Usage

1
2
3
4
5
6
7
8
ids(
  n,
  ...,
  vals = list(...),
  style = "snake",
  global = TRUE,
  use_openssl = FALSE
)

Arguments

n

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

...

A number of character vectors

vals

A list of character vectors, instead of ...

style

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

global

Use global random number generator that responds to set.seed (see random_id for details, but note that the default here is different).

use_openssl

Use openssl for random number generation when using a non-global generator (see random_id for details)

Value

Either a character vector of length n, or a function of one argument if n is NULL

Author(s)

Rich FitzJohn

Examples

1
# For an example, please see the vignette

richfitz/ids documentation built on Dec. 13, 2021, 7:07 a.m.