licols {stcos} | R Documentation |
licols
Description
Extract a linearly independent set of columns of a matrix.
Usage
licols(X, tol = 1e-10, quiet = FALSE)
Arguments
X |
A matrix. |
tol |
A tolerance for rank estimation. Default is 1e-10. |
quiet |
logical; if FALSE, print a warning about computation time if |
Details
An R version of a Matlab licols
function given in
this MathWorks forum post.
Value
Xsub
contains the extracted columns of X
and idx
contains the indices (into X) of those columns. The elapsed time is stored in
elapsed.sec
.
Examples
x = 0:19 %% 3 + 1
Z = model.matrix(~ as.factor(x) - 1)
X = cbind(1, Z)
licols(X)
[Package stcos version 0.3.1 Index]