https://github.com/cran/pracma
Raw File
Tip revision: 392ae21a013fb3f518e8f9eb8efb458a55a2eca2 authored by HwB on 09 April 2011, 00:00:00 UTC
version 0.3-0
Tip revision: 392ae21
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