% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/permutations.R
\name{permutations}
\alias{permutations}
\title{Determine all permutations of a set.}
\usage{
permutations(set)
}
\arguments{
\item{set}{a set}
}
\value{
a matrix whose rows are the permutations of set
}
\description{
An implementation of the Steinhaus-Johnson-Trotter permutation algorithm.
}
\examples{
permutations(1:3)
permutations(c('first','second','third'))
permutations(c(1,1,3))
apply(permutations(letters[1:6]), 1, paste, collapse = '')
}
