Nothing
#==================================================================================================#
# Dirichlet distribution
#==================================================================================================#
#' @title Uniform Dirichlet distribution
#'
#' @author Ryan Thompson <ryan.thompson1@unsw.edu.au>
#'
#' @description Random number generation for the uniform Dirichlet distribution (having all
#' concentration parameters set to one).
#'
#' @param n the number of observations
#' @param d the number of dimensions
#'
#' @return A matrix; each row is a random draw and each column is a dimension.
#'
#' @export
rudirichlet <- \(n, d) {
x <- stats::rexp(n * d)
x <- matrix(x, n, d)
x <- x / rowSums(x)
return(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.