Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

permute

Return all permutations of a vector


Description

Recursively generates all permutations of a vector. The result will be factorial(length(vals)) long so be careful with any longer vectors (e.g. longer than 10).

Usage

permute(vals)

Arguments

vals

a vector of elements to be permuted

Value

A list of vectors containing all permutation of the values

See Also

Examples

permute(letters[1:3])
permute(1:5)

vipor

Plot Categorical Data Using Quasirandom Noise and Density Estimates

v0.4.5
GPL (>= 2)
Authors
Scott Sherrill-Mix, Erik Clarke
Initial release
2017-03-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.