[R] OOP like handling of lists?
M.Kondrin
mkondrin at hppi.troitsk.ru
Fri Oct 24 04:33:05 CEST 2003
Thomas Petzoldt wrote:
> Hello,
>
> I am writing a package with a collection of several models. In order to
> allow users to play interactively with the models (in contrast to
> hacking lengthy scripts), I want to put all what is needed to run a
> particular model into a single list object for each model.
>
There is a great introduction to OO programming in R:
John M. Chambers and Duncan Temple Lang. Object-oriented programming in
R. R News, 1(3):17-19, September 2001.
There was described a more generic model of object-oriented programming
in R without UseMethod. Think about your object as a function (not a
list), and about object's methods and fields as a variables in this
function environment.
More information about the R-help
mailing list