licols: licols

View source: R/licols.R

licolsR 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 X is large.

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)


stcos documentation built on Aug. 21, 2023, 5:13 p.m.

Related to licols in stcos...