Skip to content
Prev 4423 / 63421 Next

all.equal.list() sometimes fails with unnamed and named components (PR#674)

R> x[["a"]]
R> x["a"]
R> x <- list(aa=1, bb=2, "NA"=3)
R> x["NA"]
Agreed.  Should not be too hard to spot ...
Well should it really FAIL?

What would be the precendence of the comparisons?  E.g.,

* compare the lenghts.  If different, only retain the components from 1
to the smaller lenght.

* Go through these.  If they have names, compare the names.  Then
compare the values.

[If both components have the same name but differ in value, the output
would display the name and not the position, right?  I mean something
like
  msg <- c(msg, paste("Component ", nc[i], ": ", mi, sep=""))
rather than
  msg <- c(msg, paste("Component ", i, ": ", mi, sep=""))
???]

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._