randrotate: Random rotation matrix Function for generating a random...

Description Usage Arguments Value Author(s) Examples

View source: R/randrotate.R

Description

Random rotation matrix

Function for generating a random rotation matrix in R^p using the QR decomposition of random normal distribution.

Usage

1
randrotate(p = 2)

Arguments

p

dimension of desired random rotation matrix (default = 2)

Value

p x p random rotation matrix

Author(s)

Patrick Kimes

Examples

1
2
3
4
## Not run: 
rotated_x <- tcrossprod(x, randrotate(ncol(x))) #nxp matrix

## End(Not run)

pkimes/pkimes documentation built on May 25, 2019, 8:20 a.m.