Learn R Programming

qqid (version 1.0.3)

xltIDexample: xltIDexample

Description

xltIDexample returns synthetic, valid 128-bit numbers in hexadecimal notation (hexlets) in different common formats. The synthetic examples are easy to distinguish from "real" IDs to prevent their accidental use in an application.

Usage

xltIDexample(sel = 1:5)

Arguments

sel

(numeric, logical, or character) a subsetting vector

Value

(character) a named vector of formatted hexlets.

Details

The function stores five artificial sample IDs. Input is a subsetting vector that specifies which IDs to return. More than five IDs can be requested by applying the usual subsetting rules. The IDs can be converted to the exact same QQIDs provided by QQIDexample(). The formats available are "md5": 32 hex numerals; "hex": 32 hex numerals with "0x" prefix; "UUID": Universally Unique Identifier format; "IPv6": IPv6 formatted address; "hEx": 32 hex numerals with mixed case.

See Also

QQIDexample() Returns five QQIDs

Examples

Run this code
# NOT RUN {
xltIDexample()                                  # the five stored hexlets
xltIDexample(2:3)                               # a hex number and a UUID
xltIDexample(c(TRUE, FALSE))                    # vector recycling
xltIDexample(sample(1:5, 17, replace = TRUE))   # seventeen in random order
xltIDexample("UUID") == qq2uu(QQIDexample(3))   # TRUE (correct conversion)

# }

Run the code above in your browser using DataLab