randpermut {randRotation} | R Documentation |
Generate a random permutation matrix for n
samples.
randpermut(n)
n |
Number of samples |
This methods generates an orthogonal matrix with only
one entry in each row and column being 1
, all other entries being
0
.
A random permutation matrix of dimension n x n
Peter Hettegger
tmp1 <- randpermut(5) t(tmp1) %*% tmp1