randcomb {pracma} | R Documentation |
Random Combination
Description
Generates a random combination.
Usage
randcomb(a, m)
Arguments
a |
numeric vector of some length |
m |
integer with |
Details
Generates one random combination of the elements a
of length
m
.
Value
vector of combined elements of a
Note
This behavior is different from Matlab/Octave, but does better correspond with the behavior of the perms() function.
See Also
Examples
randcomb(seq(2, 10, by=2), m = 3)
[Package pracma version 2.4.4 Index]