Learn R Programming

genpathmox (version 0.5)

comb: Enumerating the possible combinations of a specified size from the elements of a vector

Description

Enumerating the possible combinations of a specified size from the elements of a vector

Usage

comb(n, r, v = 1:n, set = TRUE, repeats.allowed = FALSE)

Arguments

n

Size of the source vector

r

Size of the target vectors

v

Source vector. Defaults to 1:n

set

Logical flag indicating whether duplicates should be removed from the source vector v

repeats.allowed

Logical flag indicating whether the constructed vectors may include duplicated values.

Value

matrix

Details

Internal function. comb is called by partition.