Fixes/additions to methods package

John Chambers
Wed, 28 Aug 2002 09:25:23 -0400

Some changes committed today to the r-devel (1.6.0) version of the
methods package:

1. The function setOldClass has been added as per the green book, p.
450.  The point in this case is not conversion as in the green book so
much as allowing old-style classes to be included in signatures given to

This worked before (with a warning), but old-style inheritance couldn't
be picked up.  Using
  setOldClass(c("chron", "times"))
should let "times" be included in signatures with the method selected
for an object of class "chron".

2. Some heuristics have been added to warn about what appear to be
mistakes in writing generic functions (e.g., wrong name, no call to
standardGeneric).  The consequences of such errrors can be obscure.

As with all heuristics, possibily warnings will occur when not
appropriate.  Let me know.

3. The function promptMethods() has been revised to generate aliases for
individual methods, according to a proposed convention:
  setMethod("f", c("character", "numeric"), .....)
would correspond to an entry in the documentation file of
(The help function doesn't yet know about this specifically.)

John M. Chambers        
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web:
r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: