Learn R Programming

SBMSplitMerge (version 1.1.1)

rdirichlet: Dirichlet distribution

Description

Draw from Dirichlet distribution

Usage

rdirichlet(n, gam)

Arguments

n

number of variates to draw

gam

a vector of concentration parameters of length K

Value

matrix dimension n*k of samples

Examples

Run this code
# NOT RUN {
rdirichlet(1, rep(2,5)) ## a length-5 probability vector
# }

Run the code above in your browser using DataLab