Learn R Programming

choplump (version 1.1.2)

chooseMatrix: Create an (n choose m) by n matrix with unique rows.

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)

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.

Arguments

n

an integer

m

an integer<=n

Author

M.P.Fay

Examples

Run this code
chooseMatrix(5,2)

Run the code above in your browser using DataLab