A derangement is a permutation which leaves no element fixed.
is.derangement(x)
Object to be tested
A vector of Booleans corresponding to whether the permutations are derangements or not.
id
# NOT RUN { is.derangement(rperm(16,4)) # }
Run the code above in your browser using DataCamp Workspace