From h.wickham at gmail.com  Fri May  2 03:53:10 2008
From: h.wickham at gmail.com (hadley wickham)
Date: Thu, 1 May 2008 20:53:10 -0500
Subject: [Rd] all.equal, classes, and order of arguments
Message-ID: <f8e6ff050805011853g66127107xb0bcae541f19b67@mail.gmail.com>

> a <- list()
> b <- structure(list(), class=c("list", "a"))
> all.equal(a, b)
[1] "Attributes: < target is NULL, current is list >"
> all.equal(b, a)
[1] "Attributes: < Modes: list, NULL >"
[2] "Attributes: < names for target but not for current >"
[3] "Attributes: < Length mismatch: comparison on first 0 components >"

which does not reveal the simple difference between a and b.  I had
also expected that all.equal would (in some sense) be symmetric with
respect to its arguments, but I can see that this would be very hard
to guarantee in general.

Hadley

-- 
http://had.co.nz/



[Rd] all.equal, classes, and order of arguments
hadley wickham