View source: R/generate_uids.R
generate_uids | R Documentation |
This function generates utterance identifiers.
generate_uids(x, origin = Sys.time())
x |
The number of identifiers te generate. |
origin |
The origin to use when generating the actual
identifiers. These identifiers are the present UNIX timestamp
(i.e. the number of seconds elapsed since the UNIX epoch,
the first of january 1970), accurate to two decimal places
(i.e. to centiseconds), converted to the base 30 system using
|
A vector of UIDs.
rock::generate_uids(5);
### Show how UIDs are the converted date/time
x <- rock::generate_uids(1);
x;
x_UID <- gsub(
"\\[\\[uid=(.*)\\]\\]",
"\\1",
x
);
x_as_nr <- rock::base30toNumeric(x_UID);
x_as_timestamp <- x_as_nr / 100;
x_as_date <-
as.POSIXct(
x_as_timestamp,
origin = "1970-01-01",
tz = "UTC"
);
x_as_date
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.