Learn R Programming

genpathmox (version 0.9)

comb: Combinations of a vector element

Description

############################################################################################

Usage

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

Value

a matrix of combinations

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

Details

Internal function