Random sample from a vector or list
Draws a random sample of size n from a vector or list, with or without replacement.
x (Vector): | List The input
data.
n (Int): = 1 Sample size.
replace (Bool): = false Sample with
replacement.
sample([1, 2, 3, 4, 5], n = 3)
sample([1, 2, 3], n = 5, replace = true)