Answers for "how to randomly select R"

R
0

how to randomly select R

#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
Posted by: Guest on February-17-2021

Code answers related to "how to randomly select R"

Browse Popular Code Answers by Language