randpermut: Generate random permutation matrix for n samples

View source: R/randRot.R

randpermutR Documentation

Generate random permutation matrix for n samples

Description

Generate a random permutation matrix for n samples.

Usage

randpermut(n)

Arguments

n

Number of samples

Details

This methods generates an orthogonal matrix with only one entry in each row and column being 1, all other entries being 0.

Value

A random permutation matrix of dimension n x n

Author(s)

Peter Hettegger

Examples

tmp1 <- randpermut(5)
t(tmp1) %*% tmp1

phettegger/randRotation documentation built on April 10, 2023, 7:25 p.m.