https://github.com/cran/pracma
Revision 8ce01a0ebcafaba3021c8ae0ffb447eeed46ed90 authored by HwB on 28 October 2012, 00:00:00 UTC, committed by Gabor Csardi on 28 October 2012, 00:00:00 UTC
1 parent 0369802
Raw File
Tip revision: 8ce01a0ebcafaba3021c8ae0ffb447eeed46ed90 authored by HwB on 28 October 2012, 00:00:00 UTC
version 1.2.5
Tip revision: 8ce01a0
combs.Rd
\name{combs}
\alias{combs}
\title{
Generate Combinations
}
\description{
Generates all combinations of length \code{m} of a vector \code{a}.
}
\usage{
combs(a, m)
}
\arguments{
  \item{a}{numeric vector of some length \code{n}}
  \item{m}{integer with \code{0 <= m <= n}}
}
\details{
  \code{combs} generates combinations of length \code{n} of the elements
  of the vector \code{a}.
}
\value{
  matrix representing combinations of the elements of \code{a}
}
\seealso{
\code{\link{perms}}, \code{\link{randcomb}}
}
\examples{
combs(seq(2, 10, by=2), m = 3)
}
\keyword{ arith }
back to top