| combinatorics {exams.forge} | R Documentation |
Combinatorics
Description
-
permutationcomputes the number of permutations -
variationcomputes the number of variations with and without replication -
combinationcomputes the number of combinations with and without replication -
combinatoricscomputes all combinatorics results fork < nand returns it as list of:permutation.nP(n)permutation.kP(k)permutation.nkP(n; k)variationV(n;k)variation.repV^W(n;k)combinationK(n;k)combination.repK^W(n;k)
-
lfactcomputes the natural logarithm of the factorial of a given numbern -
lfactquotcalculates the natural logarithm of the quotient of factorials -
lbinomcomputes the natural logarithm of the binomial coefficient, "nchoosek"
Usage
combinatorics(n, k)
variation(n, k, repl = FALSE)
combination(n, k, repl = FALSE)
permutation(n, k = rep(1, n))
lfact(n)
lfactquot(n, ...)
lbinom(n, k)
combo(n, k, repl = FALSE)
combs(n, k)
fact(n)
factquot(n, ...)
binom(n, k)
Arguments
n |
numeric: total number of elements |
k |
numeric: number of elements to choose |
repl |
logical: with repetition (default: |
... |
numeric: further arguments for |
Value
A list.
Examples
permutation(8)
permutation(8, c(1,3,2,2))
combination(8, 4)
combination(8, 4, TRUE)
variation(8, 4)
variation(8, 4, TRUE)
combinatorics(8, 4)
[Package exams.forge version 1.0.10 Index]