R-alpha: inheritance ([.ts)

Paul Gilbert pgilbert@bank-banque-canada.ca
Thu, 11 Dec 1997 13:46:44 -0500

While commenting out the previously mentioned warning seems to work, I have been
reflecting on this problem and there seems to be an issue wrt inheritance that I
do not understand properly. Perhaps some gurus could comment.

As mentioned previously, I have a class "tframe" with more specific classes
indicating how time is being represented, such as
> class(tframe(data))
[1] "ts"     "tframe"
and in R0.60 "[.ts" produces warning messages when I use tframe(data)[2].

Now tframe(data) is NOT a "ts", it is a specific kind of "tframe". When I coded
this I was expecting it would use  "[.default", so to date I guess it has just
been working accidentally.

Does the fact that there is a class "ts" mean that one should not have another
class with "ts" as its more specific class? This seems like a pretty severe

Paul Gilbert

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch