[Rd] Ref classes: can I register fields as I register methods?

From: Janko Thyson <janko.thyson_at_ku-eichstaett.de>
Date: Sun, 21 Nov 2010 23:18:33 +0100


ink1">Hi there,  

is it possible to register fields as you can register methods with getRefClass("Classname")$methods(.)?  

I know that you should usually give some thought on which fields you need and hardcode them in the class def. But I'm playing around with dynamically creating/extending sort of a template class that already offers basic functionality shared by all objects that "inherit" from that class. If I follow the usual inheritance paradigm I would have to actually define those new "subclasses" and let them inherit from the superclass (contains argument(, right? But can I get around that by sort of registering new fields? Maybe with 'initFields(.)'?  

Thanks for any info on that,

Janko  

##### SYSTEM INFO ##### Windows XP SP3

R 2.12.0

Eclipse 3.6.1 (Helios)

StatET 0.9.1

#####################

 

 


	[[alternative HTML version deleted]]

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 21 Nov 2010 - 22:21:14 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 22 Nov 2010 - 18:00:25 GMT.

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

list of date sections of archive