orthMat: Calculate an orthonormal basis

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/ppcapM.R

Description

A copied (unexported) function from pcaMethods. ONB = orth(mat) is an orthonormal basis for the range of matrix mat. That is, ONB' * ONB = I, the columns of ONB span the same space as the columns of mat, and the number of columns of ONB is the rank of mat.

Usage

1
orthMat(mat, skipInac = FALSE)

Arguments

mat

matrix – matrix to calculate the orthonormal basis of

skipInac

logical – do not include components with precision below .Machine$double.eps if TRUE

Value

orthonormal basis for the range of mat

Author(s)

Wolfram Stacklies

References

Stacklies, W., Redestig, H., Scholz, M., Walther, D. and Selbig, J., 2007. doi.

See Also

orth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(102)
X <- matrix(rnorm(10), 5, 2)
norm(X[,1], type="2")
norm(X[,2], type="2")
t(X[,1])%*%X[,2]
Xorth <- orthMat(X)
# now unit norms
norm(Xorth[,1], type="2")
norm(Xorth[,2], type="2")
# and zero dot product
t(Xorth[,1])%*%Xorth[,2]

HGray384/pcaNet documentation built on Oct. 5, 2019, 3:36 p.m.