swh:1:snp:dcccee4ba1e6e7fdbe7bdf90401f2f9499bd525b
Raw File
Tip revision: d5bfb0e3b7a3211ff2bbe2926e5ba31aa24e4df6 authored by HwB on 09 March 2012, 00:00:00 UTC
version 1.0.1
Tip revision: d5bfb0e
randperm.Rd
\name{randperm}
\alias{randperm}
\title{
Random Permutation
}
\description{
Generates a random permutation.
}
\usage{
randperm(a)
}
\arguments{
  \item{a}{numeric vector of some length \code{n}}
}
\details{
  Generates one random permutation of the elements \code{a}.
}
\value{
  vector of permuted elements of \code{a}
}
\note{
  This behavior is different from Matlab/Octave, but does better correspond
  with the behavior of the perms() function.
}
\seealso{
\code{\link{perms}}
}
\examples{
randperm(6)
randperm(1:6)
randperm(seq(2, 10, by=2))
}
\keyword{ arith }
back to top