[R] OOP like handling of lists?

2003-10-23 Thread Thomas Petzoldt
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. Then there will be a

Re: [R] OOP like handling of lists?

2003-10-23 Thread Patrick Burns
I think what you want to write is: setParms(lvmodel) - list(k1=0.5) which means that you need to define an assignment function. If you are using S3 style OOP (which you appear to be), then do something along the lines of: 'setParms-' - function(x, value) UseMethod('setParms-')

Re: [R] OOP like handling of lists?

2003-10-23 Thread M.Kondrin
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.