% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generators.R
\name{rdirichlet}
\alias{rdirichlet}
\title{Sample from the Dirichlet distribution}
\usage{
rdirichlet(n, alpha, k = NULL)
}
\arguments{
\item{n}{Number of samples (rows) to draw}

\item{alpha}{Concentration parameters; either length 1 or length > 1
If length 1, assumes symmetric Dirichlet; \code{k} must not be null}

\item{k}{Number of components (columns); ignored if \code{length(alpha) > 1}}
}
\value{
A matrix of \code{n} rows and \code{length(alpha)} or \code{k} columns
}
\description{
Sample from the Dirichlet distribution
}
\examples{
  rdirichlet(10, .1, 5)
  rdirichlet(10, c(.8, .1, .1))
}
\seealso{
Other generators: 
\code{\link{draw_corpus}()},
\code{\link{journal_specific}()},
\code{\link{peak_alpha}()}
}
\concept{generators}
