randpermut: Generate random permutation matrix for n samples

Description Usage Arguments Details Value Author(s) Examples

View source: R/randRot.R

Description

Generate a random permutation matrix for n samples.

Usage

1

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

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

randRotation documentation built on April 14, 2021, 6:01 p.m.