R/simplex_sample.R

Defines functions simplex_sample

simplex_sample <- function(N = 1, d = 2) {
    e <- array(stats::rexp(d * N, 1), c(N, d))
    s <- e/rowSums(e)
    return(s)
}

Try the dtangle package in your browser

Any scripts or data that you put into this service are public.

dtangle documentation built on Dec. 2, 2019, 1:09 a.m.