The Combinations package


This package provides a very simple facility which is to compute all of the n choose r combinations from selecting r items from a set of n elements. This is useful in sampling, probability, etc. The package also illustrates one approach to handling very large vectors of data that are generated dynamically.

The code is adapted from Glen Rhoads' code at, originally at

The package also serves as a relatively simple example of how to


You can install this for R using the R command (i.e. within an R session)
install.packages("Combinations", repos = "")
Alternatively, download the source and install it using
 R CMD INSTALL Combinations_0.2-0.tar.gz
or use the binary version.
Duncan Temple Lang <>
Last modified: Tue Mar 2 21:45:53 PST 2010