Learn R Programming

xactonomial (version 1.0.3)

sample_unit_simplexn: Sample n times from the unit simplex in d dimensions

Description

Sample n times from the unit simplex in d dimensions

Usage

sample_unit_simplexn(d, n)

Value

The grid over Theta, the parameter space. To be converted to a matrix with d columns and nsamp rows

Arguments

d

the dimension

n

the number of samples to take uniformly in the d space

Examples

Run this code
matrix(sample_unit_simplexn(3, 10), ncol = 3, byrow = TRUE)

Run the code above in your browser using DataLab