Choose random element from set

random_from_set(set)

Arguments

set

vector, set of values to choose from

Value

a single element from a given set

Examples

random_from_set(c("a", "b", "c"))
#> [1] "a"