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

chooseMatrix

Create matrix with choose(n,m) unique rows with m ones in each row the rest 0.


Description

Create a choose(n,m) by n matrix. The matrix has unique rows with m ones in each row and the rest zeros.

Usage

chooseMatrix(n, m)

Arguments

n

an integer

m

an integer<=n

Value

A matrix with choose(n,m) rows n columns. The matrix has unique rows with m ones in each row and the rest zeros.

Note

Used for complete enumeration when method='exact.ce' in permTS

Author(s)

M.P.Fay

See Also

Examples

chooseMatrix(5,2)

perm

Exact or Asymptotic permutation tests

v1.0-0.0
GPL
Authors
Michael Fay
Initial release
2010-07-29

We don't support your browser anymore

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