[Rd] all.equal(, ) not considering names [was "vector documentation error?"]

Martin Maechler maechler at stat.math.ethz.ch
Wed Jul 21 17:08:37 CEST 2004


>>>>> "Spencer" == Spencer Graves <spencer.graves at pdf.com>
>>>>>     on Wed, 21 Jul 2004 05:47:01 -0700 writes:

    Spencer> The help file for "vector" in R 1.9.1 for Windows includes the 
    Spencer> following: 

    Spencer> x <- c(a = 1, b = 2)
    Spencer> is.vector(x)
    Spencer> as.vector(x)
    Spencer> all.equal(x, as.vector(x)) ## FALSE

    Spencer> I ran this just now and got TRUE. 

yes, I get this as well {R-patched on Linux}.

I'm sure that it never returned FALSE, since  all.equal()
doesn't ever.   However it *did* give non TRUE
in R versions up to 1.6.2 :

  > x <- c(a=1,b=2); all.equal(x, as.vector(x))
  [1] "names for target but not for current" "TRUE" 

and it does give something similar in the our S-plus 6.1 version.

Our documentation does nowhere specify what should happen
exactly in this case, but I do doubt that the current behavior
is correct.
What do other (long time S language) users think?


    Spencer> Should I bother to report such things?  

yes, please, in any case!

    Spencer> If yes, to whom? 

As long as you have a "?" going with it, it's not something you
should report as bug. 
In that case, you decide between R-help or R-devel
and the posting guide has a paragraph on this.
I think you decided very well for the current topic.

<....>


    Spencer> p.s.  Please excuse if I'm sending this to the
    Spencer> wrong address.  I went to www.r-project.org ->
    Spencer> Mailing Lists and double clicked on an apparent hot
    Spencer> link to "r-bugs" and got nothing <....>

Well, R-bugs is *not* a mailing list.  You'll find its address
in other places such as the R-FAQ or
help(bug.report).

    Spencer> Therefore, I decided to send this to r-devel.

The "therefore" wasn't quite correct IMO, but your conclusion
anyway ;-)



More information about the R-devel mailing list