calc_combination: Combination/Permutation computation

View source: R/calc_combination.r

calc_combinationR Documentation

Combination/Permutation computation

Description

Computation of number of combinations/permutations.

Usage

calc_combination(n, r, order_matter = FALSE, with_repetition = FALSE)

Arguments

n

A numeric single value, that will be the total number of observations

r

A numeric single value, that will be the number of observations to be selected

order_matter

A boolean value, if TRUE the function will be a permutation, if not a combination (default = FALSE)

with_repetition

A boolean value, if TRUE the function will consider that there will be repetitions (default = FALSE)

Value

A numeric single value.

Examples


calc_combination(6,2)

calc_combination(6,2,order_matter = TRUE,with_repetition = TRUE)


vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.