qgram {rcdd} | R Documentation |
GMP Rational Gram-Schmidt
Description
Find Orthogonal Basis
Usage
qgram(x, remove.zero.vectors = TRUE)
Arguments
x |
matrix of type |
remove.zero.vectors |
logical. |
Value
If remove.zero.vectors == FALSE
,
a matrix of the same dimensions as x
whose columns are orthogonal
and span the same vector subspace as the columns of x
.
Since making the columns unit vectors in the L2 sense could require
irrational numbers, the columns are made unit vectors in the L1 sense
unless they are zero vectors (which, of course, cannot be normalized).
If remove.zero.vectors == TRUE
, then the result is the same
except zero vectors are removed,
so the columns of the result form a basis of the subspace.
See Also
Examples
foo <- cbind(c("1", "1", "0", "0", "0"),
c("2", "1", "0", "0", "0"),
c("3", "1", "0", "0", "0"),
c("1", "2", "3", "4", "5"))
qgram(foo)
qgram(foo, remo = FALSE)
[Package rcdd version 1.6 Index]