View source: R/ck_generate_rkeys.R
ck_generate_rkeys | R Documentation |
This function allows to create random record keys from a uniform distribution. If no seed is specified, a seed value is computed from the input data set to allow for reproducability depending on the input data set.
ck_generate_rkeys(dat, nr_digits = 8, seed = NULL)
dat |
microdata used to generated hash for random seed |
nr_digits |
maximum number of digits in the record keys. The default setting ( |
seed |
if not |
a numeric vector with nrow(dat)
record keys
dat <- ck_create_testdata()
dat$rkeys <- ck_generate_rkeys(dat = ck_create_testdata(), nr_digits = 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.