Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
UUID can be suboptimal for many uses-cases because:
Instead, herein is proposed ULID:
ulid() // 01ARZ3NDEKTSV4RRFFQ69G5FAV
01AN4Z07BY 79KA1307SR9X4MV3 |----------| |----------------| Timestamp Randomness 48bits 80bits
Timestamp - 48 bit integer - UNIX-time in milliseconds - Won't run out of space till the year 10889 AD.
Randomness - 80 bits - Cryptographically secure source of randomness, if possible
The left-most character must be sorted first, and the right-most character sorted last (lexical order). The default ASCII character set must be used. Within the same millisecond, sort order is not guaranteed.
The following functions are implemented:
ULIDgenerate
/ generate
/ ulid_generate
: Generate a time-based ULIDts_generate
: Generate ULID from timestampsunmarshal
: Unmarshal a ULID into a data frame with timestamp and random bitstring columnslibrary(ulid)
ulid::ULIDgenerate()
(u <- ulid::ULIDgenerate(20))
unmarshal(u)
(ut <- ts_generate(as.POSIXct("2017-11-01 15:00:00", origin="1970-01-01"))) unmarshal(ut)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.