This function generates all possible permutations of the elements in a given
vector x. The result is returned as a matrix, where each row represents a
unique permutation of the input vector.
Usage
permute(x)
Value
A matrix where each row is a unique permutation of the input vector x.
Arguments
x
A vector of elements to permute. The elements can be of any type, but
they should be unique for meaningful permutations.