View source: R/generate_uids.R
generate_uids | R Documentation |
This function generates utterance identifiers. Utterance identifiers are
Short Quasi-Unique Identifiers (SQUIDs) generated using
the squids::squids()
function.
generate_uids(x, origin = Sys.time(), follow = NULL, followBy = NULL)
x |
The number of identifiers to generate. |
origin |
The origin to use when generating the actual
identifiers; see the |
follow |
A vector of one or more UIDs (or a list; lists are
recursively |
followBy |
When following a vector of UIDs, this can be used to specify the distance between the two vectors in centiseconds. |
A vector of UIDs.
### Produce and store five UIDs
fiveUIDs <-
rock::generate_uids(5);
### Look at them
fiveUIDs;
### Use a specific origin to be able to reproduce
### a set of UIDs later (e.g. in a script)
uidOrigin <-
as.POSIXct("2025-05-21 21:53:25 CEST");
rock::generate_uids(
5,
origin = uidOrigin
);
### Produce five more UIDs to show
### their 'progression'
rock::generate_uids(5);
### Produce a set of five UIDs that follow
### the first set of five UIDs
rock::generate_uids(
5,
follow = fiveUIDs
);
### Follow with a 'distance' of 5 utterances
rock::generate_uids(
5,
follow = fiveUIDs,
followBy = 5
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.