getRandString: getRandString

Description Usage Arguments Details Value Examples

View source: R/rand.R

Description

Create a psuedo-random alphanumeric string

Usage

1
getRandString(len = 12)

Arguments

len

The number of characters in the string created

Details

The characters in the string are sampled with a replacement from a pool of the numbers 0 through 9, A-Z, and a-z, with equal sampling probability for all items in the pool.

The string returned is not gauranteed to be unique across runs, so take care when using this function to create unique identifiers (e.g., for files names). Consider packages such as ids or uuid in situations where all generated identifies must be globally unique.

Value

A character vector of length 1

Examples

1
getRandString(len = 12)

wjhopper/whoppeR documentation built on May 4, 2019, 7:33 a.m.