Skip to content
Prev 13202 / 63424 Next

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

The following is what I got from S-Plus 6.2 under Windows 2000: 

 > x <- c(a = 1, b = 2)
 > is.vector(x)
[1] F
 > as.vector(x)
[1] 1 2
 > all.equal(x, as.vector(x))
[1] "target, current classes differ: named : 
integer"                                                   
[2] "class of target is \"named\", class of current is \"integer\" 
(coercing target to class of current)"

      Thanks, Martin and all of the core R team for their exceptional 
contribution to this marvelous software.  I think it provides a great 
liberating force to all research that includes the development of new 
statistical algorithms by making it so much easier for others to modify 
and extend something that previous researchers have developed. 

      Best Wishes,
      spencer graves
Martin Maechler wrote: