Howdy, On Wed, Aug 25, 2010 at 1:21 PM, Joris Meys <jorism...@gmail.com> wrote: > Hi Steve, > > thanks for the tip. I'll definitely take a closer look at your > solution for implementation for future use. But right now I don't > have the time to start rewriting my class definitions. > > Luckily, I found where exactly things were going wrong. After reading > into the documentation about the evaluation in R, I figured out I have > to specify the environment where substitute should look explicitly as > parent.frame(1). I still don't understand completely why exactly, but > it does the job. > > Thus : > eval(eval(substitute(expression(obj...@extra[[name]] <<- value)))) > > should become : > > eval( > eval( > substitute( > expression(obj...@extra[[name]] <<- value) > ,env=parent.frame(1) ) > ) > )
My eyes start to gloss over on their first encounter of `substitute` ... add enough `eval`s and (even) an `expression` (!) to that, and you'll probably see me running for the hills ... but hey, if it makes sense to you, more power to you ;-) Glad you found a fix that works, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact ______________________________________________ R-help@r-project.org 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.