[R] Classes

From: Nick <nick.straw_at_gmail.com>
Date: Sat, 15 Nov 2008 13:39:44 -0800 (PST)


Code:

# svm is an S3 class, so:
setOldClass("svm")

# Create the super class model:

setClass("model")

# For svm from e1071 this works (well gives no error):
setIs("svm", "model")

# For rvm from kernlab this gives and error:
setIs("rvm", "model")

# the "superclass" list for class "rvm" includes an undefined class
"vm"

Is there any way round this?

I am trying to write a super class so that I can use the same interface for both of these classes.

Thanks.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 16 Nov 2008 - 02:32:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Nov 2008 - 22:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive