From jmc at r-project.org  Sun Apr 26 21:58:27 2009
From: jmc at r-project.org (John Chambers)
Date: Sun, 26 Apr 2009 12:58:27 -0700
Subject: [Rd] Some extensions to class inheritance and method selection
Message-ID: <49F4BCE3.5040704@r-project.org>

Changes were committed today to the r-devel version of R to make S4 and 
S3 classes (and abnormal object types such as "environment") work 
together more consistently.

Basically, S4 classes can now contain any S3 class or object type, and 
should now inherit S3 methods for these.  Also, the main practical 
problem with defining S3 methods for other S4 classes (namely, that S4 
inheritance was not recognized) has been fixed, to the extent possible.

See ?Methods (especially the section on S3 methods).  For details (there 
are quite a few) see the paper referenced there,
  http://stat.stanford.edu/~jmc4/classInheritance.pdf

Since these changes arguably fix design flaws, I would like to see them 
in 2.9.1, so please test them out.  For the moment, they are only in the 
r-devel version.

There can be changes to current behavior.  For example, I found one 
regression test for S4 methods that only worked because an apparent S3 
method, sort.list, was NOT inherited by an S4 class that contained "list".

John



[Rd] Some extensions to class inheritance and method selection
John Chambers