find_linear_dependent_columns: Find linear dependent columns in a design matrix

View source: R/find_linear_dependent_columns.R

find_linear_dependent_columnsR Documentation

Find linear dependent columns in a design matrix

Description

Find linear dependent columns in a design matrix

Usage

find_linear_dependent_columns(mat, tol = 1e-12)

Arguments

mat

a matrix

tol

a double that specifies the numeric tolerance

Value

a list with vectors containing the indices of linearly dependent columns

See Also

The algorithm and function is inspired by the internalEnumLC function in the 'caret' package (GitHub)

Examples

  mat <- matrix(rnorm(3 * 10), nrow = 10, ncol = 3)
  mat <- cbind(mat, mat[,1] + 0.5 * mat[,3])
  find_linear_dependent_columns(mat)  # returns list(c(1,3,4))


fullRankMatrix documentation built on July 3, 2024, 5:12 p.m.