R/rdirichlet.R

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

Try the freqMAP package in your browser

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

freqMAP documentation built on May 29, 2017, 11:42 p.m.