uuid: Generate UUIDs

Description Usage Arguments Author(s) Examples

Description

Generate UUIDs using the uuid package. This is simply a thin wrapper around uuid::UUIDgenerate that matches the interface in the rest of the ids package.

Usage

1
uuid(n = 1, drop_hyphens = FALSE, use_time = NA)

Arguments

n

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

drop_hyphens

Drop the hyphens from the UUID?

use_time

Passed through to UUIDgenerate as use.time.

Author(s)

Rich FitzJohn

Examples

1
2
3
4
5
6
7
8
# Generate one id
uuid()

# Or a bunch
uuid(10)

# More in the style of random_id()
uuid(drop_hyphens = TRUE)

Example output

[1] "53c32550-fefb-44e4-a217-87f4ad750b84"
 [1] "7584a5cb-b4f8-41b8-b4f3-ad2e2e131c03"
 [2] "78397cd3-b5b7-4612-9f59-1acf2b901cb2"
 [3] "dd706014-9b9b-439e-a907-9332ea36dca3"
 [4] "f0cd7fce-0e0c-418e-8783-2e5e10488ba9"
 [5] "f0244705-bcfb-48a5-98cf-647ca5adc4a3"
 [6] "545b0a9a-4423-4f91-b06a-7d4e8226a860"
 [7] "97e8f9dc-550c-4836-b486-08040a6b3432"
 [8] "6a30e8f1-4a09-4182-87ed-af7db27bcecd"
 [9] "8cc11967-6fed-4adc-972d-c69debc30440"
[10] "a31e55a9-b795-46e3-8420-2590ff1d2a7a"
[1] "75335800f2624cb9bbe6bfeff27b2af6"

ids documentation built on May 2, 2019, 2:08 a.m.