permn | R Documentation |
Generates all n!
vectors of length n
consisting of permutations of the integers 1 to n
.
permn(n)
n |
Number of elements. |
Adapted from the "permutations" function in the e1071 R package.
Matrix of dimension n
by n!
where each column contains a unique permutation vector.
For large n
this function will consume a lot of memory and may even crash R.
Used for exact tests in np.cor.test
and np.reg.test
.
Nathaniel E. Helwig <helwig@umn.edu>
Meyer, D., Dimitriadou, E., Hornik, K., Weingessel, A., & Leisch, F. (2018). e1071: Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien. R package version 1.7-0. https://CRAN.R-project.org/package=e1071
permn(2)
permn(3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.