randcomb | R Documentation |
Generates a random combination.
randcomb(a, m)
a |
numeric vector of some length |
m |
integer with |
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.
combs
, randperm
randcomb(seq(2, 10, by=2), m = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.