uuid: Universally Unique Identifiers

View source: R/utils.R

uuidR Documentation

Universally Unique Identifiers

Description

Generate a UUIDv4.

Usage

uuid(uppercase = FALSE)

hex2raw(x)

raw2hex(x, uppercase = FALSE)

Arguments

x

A vector to convert between raw bytes and hexadecimal strings.

uppercase

Should the result be in uppercase?

Details

uuid generates a random (version 4) universally unique identifier. A private RNG stream is used to avoid collisions due to set.seed and to avoid altering the global .Random.seed.

hex2raw converts a hexadecimal string to a raw vector.

raw2hex converts a raw vector to a hexadecimal string.

Value

For uuid, a list of length 2:

  • string: A character vector giving the UUID.

  • bytes: The raw bytes of the UUID.

For hex2raw, a raw vector.

For raw2hex, a character vector of length 1.

Author(s)

Kylie A. Bemis

Examples

id <- uuid()
id
hex2raw(id$string)
raw2hex(id$bytes)

kuwisdelu/matter documentation built on Dec. 8, 2024, 8:09 p.m.