set_vector {fixtuRes} | R Documentation |
Generate a vector of a values from a set
Description
Generate a vector of a values from a set
Usage
set_vector(size, set = NULL, set_type = NULL, set_size = NULL, ...)
Arguments
size |
integer, vector length |
set |
vector a set of values to pick from; default: NULL |
set_type |
string if set is NULL generate a random set of type ("integer", "string", "boolean", "numeric"); default: NULL |
set_size |
integer, number of elements in random set; default: NULL |
... |
additional arguments for random set generator.
For details check |
Note
When using a random set, be aware, that set has to be unique, thus if arguments passed to generator do not allow this, the function can end up in an infinite loop.
Examples
set_vector(10, set = c("a", "b", "c"))
set_vector(size = 5, set_type = "string", set_size = 3)
[Package fixtuRes version 0.1.3 Index]