[R] Classes

Nick nick.straw at gmail.com
Sat Nov 15 22:39:44 CET 2008


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.



More information about the R-help mailing list