[R] Communative Matrix Multiplcation
Doran, Harold
HDoran at air.org
Thu Aug 16 13:24:53 CEST 2012
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 [maechler at stat.math.ethz.ch]
Sent: Thursday, August 16, 2012 3:42 AM
To: David Reiner
Cc: Doran, Harold; 'r-help at r-project.org'
Subject: Re: [R] Communative Matrix Multiplcation
>>>>> David Reiner <David.Reiner at 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-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of
> Doran, Harold Sent: Tuesday, August 14, 2012 12:55 PM
> To: Berend Hasselman Cc: 'r-help at 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:bhh at xs4all.nl] Sent: Tuesday, August 14, 2012
>> 1:49 PM To: Doran, Harold Cc: 'r-help at 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
>>
More information about the R-help
mailing list