Description Usage Arguments Value Note References Examples

All m combinations of the first n integers taken p at a time
are computed and return as an p by m matrix. The columns
of the matrix are ordered so that adjacent columns differ
by only one element. This is just a reordered version of
`combn`

in base R, but the ordering is useful for some
applications.

1 | ```
combos(n,p)
``` |

`n` |
The n in n choose p |

`p` |
The p in n choose p |

a `matrix`

of dimension p by `choose(n,p)`

Implementation based on a Pascal algorithm of Limin Xiang
and Kazuo Ushijima (2001) translated to ratfor for R.
If you have rgl installed you might try `demo("combos")`

for a visual impression of how this works.

Limin Xiang and Kazuo Ushijima (2001)
"On O(1) Time Algorithms for Combinatorial Generation,"
*Computer Journal*, 44(4), 292-302.

1 | ```
H <- combos(20,3)
``` |

quantreg documentation built on May 19, 2017, 8:33 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.