# Generate a 5 x 5 random orthogonal matrix
Random.Start(5)
# Generate a random orthogonal start matrix
Q <- Random.Start(4)
# Verify orthogonality: t(Q) %*% Q should equal the identity matrix
stopifnot(isTRUE(all.equal(t(Q) %*% Q, diag(4), tolerance = 1e-10)))
# Use as starting matrix for rotation
data("Thurstone", package = "GPArotation")
simplimax(box26, Tmat = Random.Start(3))
Run the code above in your browser using DataLab