[Rd] Determinant function (PR#9715)

From: <krys_at_maths.lth.se>
Date: Fri, 01 Jun 2007 17:03:26 +0200 (CEST)


Full_Name: Krzysztof Podgorski
Version: R version 2.4.1 (2006-12-18)
OS: Windows XP
Submission from: (NULL) (130.235.3.79)

The function ''det'' works improperly for a singular matrix and returns a non-zero value even if ''solve'' reports singularity. The matrix is very simple as shown below.

A <- diag(rep(c(64,8), c(8,8)))
A[9:16,1] <- 8
A[1,9:16] <- 8

det(A)
#[1] -196608

solve(A)
#Error in solve.default(A) : system is computationally singular: reciprocal
condition number = 2.31296e-18



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 04 Jun 2007 - 09:39:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Jun 2007 - 16:33:47 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.