Takes one sample from a vector or list. Does not throw an error for zero length lists.

sample_one_of(x)

Arguments

x

A vector of one or more elements from which to choose

Value

One value, drawn from x.