Learn R Programming

uuid (version 1.0-4)

UUIDgenerate: Generate UUID

Description

UUIDgenerate generates a new Universally Unique Identifier. It can be either time-based or random.

Usage

UUIDgenerate(use.time = NA, n = 1L)

Arguments

use.time

logical, if TRUE then time-based UUID is generated, if FALSE then a random UUID is generated, if NA then random one is generated if a sufficiently reliable source of random numbers can be found, otherwise a time-based UUID is generated.

n

integer, number of UUIDs to generate. Must be in [0, 2^31)

Value

String, UUID in lowercase form.

Examples

Run this code
# NOT RUN {
UUIDgenerate()
UUIDgenerate(TRUE)
UUIDgenerate(FALSE)
## see if the randomness is any good
length(unique(UUIDgenerate(n=1000)))
# }

Run the code above in your browser using DataLab