Learn R Programming

bbricks (version 0.1.1)

rDir: Random generation for Dirichelt distribution

Description

Generate random samples from Dirichlet distribution.

Usage

rDir(n, alpha)

Arguments

n

integer, number of samples.

alpha

numeric, Dirichlet parameter.

Value

A numeric matrix of n rows and length(alpha) columns.

See Also

dDir

Examples

Run this code
# NOT RUN {
rDir(5,c(1,2,3)) #generate 5 samples with parameters c(1,2,3)
# }

Run the code above in your browser using DataLab