A slightly modified version of solve that allows a tolerance argument for singularity (tol) which is passed to qr.

solve

tol

qr

solvet(a, b, tol=1e-09)

a square numeric matrix

a numeric vector or matrix

tolerance for detecting linear dependencies in columns of a

a