[Rd] UseMethod; all.equal; isas-tests

John Chambers jmc@research.bell-labs.com
Tue Jan 21 15:38:05 2003

1. UseMethod (via usemethod in objects.c) now uses the definition of
class() to dispatch, with the methods package attached (dataClass(x))
and without (attr(x, "class")).

Packages using a construction of the form
	if(is.null(class(x))) class(x) <- data.class(x)
should now get similar dispatch with the methods package attached.

2. all.equal and some of its pseudo-methods have been modified to work
when those methods (all.equal.numeric, all.equal.character) are in fact

"Work" may not extend to identical character string output when the
arguments don't match equal (though it does in some simple cases).  But
it's not a good idea to rely on that output for testing, better to use
one of
	identical(target, current)
	identical(all.equal(target, current, ...), TRUE))

3. The isas-tests have been modified to use identical() rather than
all.equal for the tests that have produced voluminous output.  We should
eventually examine why various of these tests "fail", but at least the
volume of the output is much less and the test should be more stable.

John M. Chambers                  jmc@bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc