comb: comb

Description Usage Arguments Value Examples

View source: R/comb.R

Description

Calculates the number of combinations of n things drawn r at a time.

Usage

1
comb(n, r, repetition = FALSE)

Arguments

n

The total number of items.

r

The number of items to be drawn.

repetition

A logical, whether or not repetitions are allowed. FALSE by default.

Value

An integer giving the number of ways a set of r items can be drawn from a set of n items.

Examples

1
2
comb(5, 3)
comb(5, 3, repetition = TRUE)

jfq3/QsRutils documentation built on Jan. 18, 2021, 12:40 a.m.