Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

combs

Generate Combinations


Description

Generates all combinations of length m of a vector a.

Usage

combs(a, m)

Arguments

a

numeric vector of some length n

m

integer with 0 <= m <= n

Details

combs generates combinations of length n of the elements of the vector a.

Value

matrix representing combinations of the elements of a

See Also

Examples

combs(seq(2, 10, by=2), m = 3)

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.