[R] class and method

jiho.han jiho.han at yahoo.com
Fri Apr 13 00:28:01 CEST 2007


Hi, R-experts

I defined a new class of object, called "alpha", which is basically a
data.frame. And (I think) I know how to create a method for "alpha", such as
"summary.alpha", "plot.alpha". The problem is, when I try to access "alpha"
object by usual data.frame method, it won't.

For example, suppose X is an object of class "alpha". Then, the commands
such as dim(X), X[1,1], none of these works. 

I want to know how to define a class so that when there is appropriate
methods use it, but when there's not use the predetermined method for
underlying object. Any comments would be appreciated. Thanks-





-- 
View this message in context: http://www.nabble.com/class-and-method-tf3568696.html#a9969691
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list