randcomb.RdGenerates a random combination.
randcomb(a, m)Generates one random combination of the elements a of length
m.
vector of combined elements of a
This behavior is different from Matlab/Octave, but does better correspond with the behavior of the perms() function.
randcomb(seq(2, 10, by=2), m = 3)
#> [1] 4 6 2