R/my_rdirichlet.R

Defines functions my_rdirichlet

my_rdirichlet <- function (n, alpha)
 
{
    l <- length(alpha)
    x <- matrix(rgamma(l * n, alpha), ncol = l, byrow = TRUE)
    sm <- x %*% rep(1, l)
    x/as.vector(sm)
}

Try the GeneFeST package in your browser

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

GeneFeST documentation built on May 29, 2017, 7:49 p.m.