Hi.

When I extend "numeric" with S4 and create an instance, I get something 
that looks and acts like a numeric.  When I extend "data.frame" and 
create an instance, I get a NULL 'core'.  Why is this, and can it be 
fixed?  setOldClass(), prototype=, and initialize() don't seem to help.

Thanks,

Tim
----
setClass("numClass",representation("numeric",num="numeric"))
nn <- new("numClass",2,num=1)
nn
nn+1

setClass("dfClass",representation("data.frame",num="numeric"))
df <- new("dfClass",as.data.frame(BOD),num=1)
df

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to