📅  最后修改于: 2022-03-11 14:51:58.838000             🧑  作者: Mango
#From a vector of n values, randomly pick y values not repeating any of them
pool <- my_set_of_values_to_pick_from
y <- #NUM = how many values i want to pick from pool
sample(pool, size=y, replace =F)
#replace = FALSE assures me no values will be picked twice