comb: Build a matrix with combinations of zeros and ones.

Description Usage Arguments Details Value Author(s) Examples

View source: R/comb.R

Description

Internal function, generally not called by users.

Usage

1
comb(m, n)

Arguments

m

an integer, corresponding to the number of zeros. It must be greater or equal to zero.

n

an integer, corresponding to the number of ones. It must be greater or equal to zero.

Details

comb builds the matrix with all combinations of m zeros and n ones. The output matrix will hence have as number of columns nc=m+n and as number of rows nr = (m + n)! / (m!n!), which is the number of all the possible combinations. Each row will contain one of the nr possible combinations of m zeros and n ones.

Value

A matrix

Author(s)

Lucia Tamburino

Examples

1
comb(3,2)

frt documentation built on May 2, 2019, 6:34 a.m.

Related to comb in frt...