Learn R Programming

VBmix (version 0.3.2)

rDirichlet:

Description

samples from the Dirichlet distribution.

Usage

rDirichlet(K, alpha = 0.1)

Arguments

K
order of the sample.
alpha
alpha parameter of the distribution (i.e. alpha repeated K times).

Value

numeric vector, which values are in [0,1] and sum to 1.

See Also

dDirichlet

Examples

Run this code
temp <- rDirichlet(4)

Run the code above in your browser using DataLab