简体   繁体   中英

How to Generate 112000 UUID in R

I want to generate n numbers of random uuid.

I have tried using

# Generate one id
uuid()

# Or a bunch
uuid(10)

Does any one have any quick R code for this?

You can use the uuid package. There are other solutions .

> library(uuid)
> 
> set.seed(357)
> replicate(10, UUIDgenerate())
 [1] "2ee63f9a-12f4-45b7-9e44-d20623f2c6c5"
 [2] "6c8c5f63-b177-485d-9463-d44edff65ba7"
 [3] "4ef747bb-e100-4119-be6a-754bf0142f92"
 [4] "6c3bde0f-a494-410d-8b6e-104e971f04fa"
 [5] "04bc1b0b-f2ff-4901-95b8-b9c6b9b1ec77"
 [6] "dbea25bf-24b4-49cb-a09c-ef4098ae1566"
 [7] "c1ceefa8-fad2-412a-8496-6549ef31f418"
 [8] "92162470-e390-44db-900e-7d9a206264da"
 [9] "6fc8cba9-d99d-4b30-a217-7e662ed91fa5"
[10] "166f0131-d881-41d9-a093-b438d07992a5"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM