[R] Singularity problem

Allan Engelhardt allane at cybaea.com
Wed Mar 16 17:25:33 CET 2011


Numeric underflow.  Try qr.solve(a)

Allan

On 16/03/11 15:28, Feng Li wrote:
> Dear R,
>
> If I have remembered correctly, a square matrix is singular if and only if
> its determinant is zero. I am a bit confused by the following code error.
> Can someone give me a hint?
>
>> a<- matrix(c(1e20,1e2,1e3,1e3),2)
>> det(a)
> [1] 1e+23
>> solve(a)
> Error in solve.default(a) :
>    system is computationally singular: reciprocal condition number = 1e-17
>
>
> Thanks in advance!
>
>
> Feng
>



More information about the R-help mailing list