[R] Solving Matrices

Erich Neuwirth erich.neuwirth at univie.ac.at
Thu Apr 15 16:04:03 CEST 2004



>>On April 15th, Elizabeth wrote:
>><snip>
>>
>>>(or x <- matrix(data=c(7, -5, 6, -7, 2, -3, 10, 9, -5,
>>>                       4, -2, 2, 8, -9, 7, 15), nrow=4, ncol=4)


qr(x)$rank
gives the rank
qr.R(qr(x))
gives the R part (an upper triangular matrix similar to the one
produced by Gauss elimination).
With the given matrix, we get rank 3, but the
last row of qr.R(qr(x)) is not 0 due to rounding errors.

-- 
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386




More information about the R-help mailing list