# A function to generate the Lehmer permutation ordering.

### Description

Generates all permutations of a given embedding dimension, ordered according to the Lehmer coding scheme.

### Usage

1 | ```
generate_lehmerperm_matrix(ndemb)
``` |

### Arguments

`ndemb` |
The embedding dimension. |

### Details

This function converts ranks to indices and back.

### Value

A numeric matrix that contains the Lehmer permutation pattern.

### Author(s)

Sebastian Sippel

### References

http://www.keithschwarz.com/interesting/code/?dir=factoradic-permutation

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.