auxfun: Auxiliary functions for 'randtoolbox' package.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Stirling numbers of the second kind and permutation of positive integers.

Usage

1
2

Arguments

n

a positive integer.

Details

stirling computes stirling numbers of second kind i.e.

Stirl_n^k = k * Stirl_{n-1}^k + Stirl_{n-1}^{k-1}

with Stirl_n^1 = Stirl_n^n = 1. e.g.

Go to wikipedia for more details.

permut compute permutation of {1, ..., n} and store it in a matrix. e.g.

Value

a vector with stirling numbers.

Author(s)

Christophe Dutang.

See Also

choose for combination numbers.

Examples

1
2
3
4
5
# should be 1
stirling(0)

#  should be 0,1,7,6,1
stirling(4)

randtoolbox documentation built on May 29, 2017, 11:59 a.m.

Search within the randtoolbox package
Search all R packages, documentation and source code