This is the inconsistency I am talking about: > getClass("POSIXt") Virtual Class
No Slots, prototype of class "NULL" Extends: Class "POSIXct", directly Class "oldClass", by class "POSIXct" > getClass("POSIXct") Virtual Class No Slots, prototype of class "NULL" Extends: "oldClass" Known Subclasses: "POSIXt" > getClass("POSIXlt") Error in getClass("POSIXlt") : "POSIXlt" is not a defined class But to quote from the online help: "POSIXct" is more convenient for including in data frames, and "POSIXlt" is closer to human-readable forms. A virtual class "POSIXt" inherits from both of the classes: it is used to allow operations such as subtraction to mix the two classes. In a S4 world wouldn't make more sense for POSIXt to be a virtual superclass and POSIXct and POSIXlt to be subclasses? But I think you have answered my other question about the future of s3. > -----Original Message----- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: 05 August 2003 19:05 > To: Marsland, John > Cc: [EMAIL PROTECTED] > Subject: Re: [Rd] s4 methods and base > > > On Tue, 5 Aug 2003, Marsland, John wrote: > > > I'm sure that many people are in the same position as me in > that they are > > trying to write packages and code that is vaguely "future proof". > > > > Would it be possible to get some guidance on how the R-core > team see the > > evolution of the "base" package with regard to s4 methods. > > > > There seem to be quite a lot of inconsistencies between s3 > and s4 methods > > and classes currently and this (I'm sure) is only to be > expected in a period > > of transition. eg POSIXlt vs POSIXt and POSIXct. And there > seem like dozens > > Those are S3 classes, and there is nothing transitional about them! > There are no S4 classes in `base R' that I am aware of to be > inconsistent. > Are you sure you understand the difference? > > > of print methods to convert > > First you need to define S4 classes, and there are currently > no moves to > do that for the statistical modelling software, for example. > > > - it's not an enviable task and I'm sure it will > > take time! ... if indeed you do see R being purged of s3 by > some point in > > the future. > > We are still using S3 classes designed a decade ago, and I > expect to be > still using them in another decade. I even have S4 versions > of some of > them (e.g. lda, multinom) and no plans to use those in R. > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > ********************************************************************** This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}} ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel