choose.pairs: all pairwise combinations from n

Description Usage Arguments Value Author(s) Examples

Description

n choose 2 tells how many pairs can be made from n objects, choose.pairs(n) gives the indices into a vector of objects of length n.

Usage

1

Arguments

n

a scalar, eg 10

Value

2 column matrix, with n choose 2 rows, and indices for each pair in a row.

Author(s)

Mark Cowley, 28 Jan 2005

Examples

1

drmjc/mjcbase documentation built on May 15, 2019, 2:27 p.m.