Description Usage Arguments Value Examples
Generate a random vector of desired type
| 1 | 
| size | integer, vector length | 
| type | "integer", "string", "boolean", "date", "time", "datetime" or "numeric" type of vector values. If custom generator provided, should be set to "custom". | 
| custom_generator | function or string, custom value generator. Can be a function or a string with function name. Default: NULL | 
| unique | boolean, should the output contain only unique values. Default: FALSE. | 
| ... | arguments passed to function responsible for generating values.
Check  | 
vector of random values of chosen type
| 1 2 3 4 5 6 7 8 | random_vector(5, "boolean")
random_vector(10, "numeric", min = 1.5, max = 5)
random_vector(4, "string", length = 4, pattern = "[ACGT]")
random_vector(2, "integer", max = 10)
# custom generator
custom_generator <- function() sample(c("A", "B"), 1)
random_vector(3, type = "custom", custom_generator = custom_generator)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.