r.derangement: Generate a collection of derangements
Description
Given a number of permutations and the number of items in the permutations
generate a sample of permutations with the specified length
and no fixed point
Usage
r.derangement(n, perm.length)
Arguments
n
number of permutations in the sample
perm.length
number of items in the permutations
Value
A sample of permutations with the specified length
and number of cycles