comb: Generate all possible combinations of m elements among n with...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Generate all possible combinations of m elements among n with repetitions.

Usage

1
comb(m, n)

Arguments

m

the number of elements to combine

n

the number of elements from which to combine the m elements

Details

There are (n+m-1)!/(m!(n-1)!) ways to combine m elements among n with repetitions, combn generates all these possible combinations.

Value

A matrix of (n+m-1)!/(m!(n-1)!) rows, and n columns, each row is a possible combination of m elements among n .

Author(s)

Hinda Haned contact@hindahaned.info

See Also

Cmn for the calculation of the number of all possible combinations of m elements among n with repetitions

Examples

1
2
3
#combine 2 objects among 3 with repetitions
Cmn(2,3)
comb(2,3)


Search within the forensim package
Search all R packages, documentation and source code

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

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

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