Thanks to you both. I'm not sure all.equal() was right for this situation, is 
it? If the differences were to the right of the decimal and differed as a 
function of precision, then I see all.equal() being the right function. But, 
the differences in the reproducible code were to the left of the decimal, but a 
lot, so I thought identical was perhaps better.

Martin, there seem to be some issues with calculations in the updated Matrix 
package. I'll send an email to matrix authors. It seems some calculations that 
were almost instantaneous with older versions are now causing R to hang. I'll 
provide reproducible examples. 
________________________________________
From: Martin Maechler [maech...@stat.math.ethz.ch]
Sent: Thursday, August 16, 2012 3:42 AM
To: David Reiner
Cc: Doran, Harold; 'r-help@r-project.org'
Subject: Re: [R] Communative Matrix Multiplcation

>>>>> David Reiner <david.rei...@xrtrading.com>
>>>>>     on Wed, 15 Aug 2012 09:59:10 -0500 writes:

    > As a mathematician, I have to correct the subject line
    > to 'Distributive Matrix operations' -- David

Yes, indeed;
that was *really* disturbing to me as well, about this thread!

{in addition to the fact that he should have used all.equal()
 and not identical()  as someone had pointed out already ..}

And at last: Yes,  some of the methods for Diagonal() matrices in the
 'Matrix' package did have bugs, in earlier versions.

NOTE: You can (and often should) update packages also if for
     some reason you cannot update your version of R!

Martin Maechler,  ETH Zurich

    > -----Original Message----- From:
    > r-help-boun...@r-project.org
    > [mailto:r-help-boun...@r-project.org] On Behalf Of
    > Doran, Harold Sent: Tuesday, August 14, 2012 12:55 PM
    > To: Berend Hasselman Cc: 'r-help@r-project.org' Subject:
    > Re: [R] Communative Matrix Multiplcation

    > Thanks, Berend. I updated my R and got same result. I
    > reposted the old sessionInfo(), which was an older
    > version. But, same code, same matrices, different result

    >> -----Original Message----- From: Berend Hasselman
    >> [mailto:b...@xs4all.nl] Sent: Tuesday, August 14, 2012
    >> 1:49 PM To: Doran, Harold Cc: 'r-help@r-project.org'
    >> Subject: Re: [R] Communative Matrix Multiplcation
    >>
    >>
    >> On 14-08-2012, at 19:26, Doran, Harold wrote:
    >>
    >> >
    >> > I'm not seeing why the following occurs:
    >> >
    >>  > T1 <- (A1 - A2) %*% D
    >>  > T2 <- (A1 %*% D) - (A2 %*% D)
    >>  > identical(T1, T2)
    >>  [1] FALSE
    >>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to