QR factorization is an important type of matrix factorization in scientific computing. It is commonly used for generating orthonormal basis and solving least squares problem.
The standard scientific library lapack supports Householder QR factorization with or without pivoting via dgeqrf and dgeqp3.
The r scientific software for statistical computing and graphics has a built-in function qr(, LAPACK = TRUE)
that interfaces dgeqp3
. Note that if LAPACK = FALSE
(default), the factorization is implemented with a modified LINPACK routine that can detect numerical rank. This is used for lm
and glm
functions that fits linear models and generalized linear models.