[Rd] all.equal() improvements (PR#8191)

maechler@stat.math.ethz.ch maechler at stat.math.ethz.ch
Mon Jan 2 20:16:17 CET 2006


I'm "happy" to have found the first problem myself:

'Matrix' doesn't pass R CMD check  anymore with the change I had
committed:

Basically because of this:

  > all.equal(cbind(1:5), matrix(1:5, 5,1, dimnames=list(NULL,NULL)))
  [1] "Attributes: < Names: Lengths (1, 2) differ (string compare on first 1) >"
  [2] "Attributes: < Length mismatch: comparison on first 1 components >"       

This new behavior is "S-compatible" insofar as S-plus 6.1 also
returns non-TRUE.

Is this what we want?
{we'll see soon how many other CRAN packages are having problems for it}

In my intuition, I'd have liked all.equal()  to return TRUE for the above,
since in principle,  dimnames = NULL  or dimnames = list(NULL,NULL) 
is a trivial difference.
OTOH, it will need "special case" code to assure this, and I
wonder if that's worth it.

Please comment!
Martin

>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>     on Mon,  2 Jan 2006 18:00:15 +0100 (CET) writes:

    MM> I've now finally finalized my work on a subset of Andy's
    MM> propositions, and committed it to R-devel.

    MM> The current change doesn't show in our own checks and
    MM> examples, but may well in other people's package checks.
    MM> For this reason, I've also added a line to the
    MM> 'USER-VISIBLE CHANGES' part of the NEWS file.

    MM> Martin

    MM> ______________________________________________
    MM> R-devel at r-project.org mailing list
    MM> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list