Skip to content
Prev 38177 / 63424 Next

Reference Classes: Generalizing Reference Class Generator objects?

Sorry - you don't need to assign the value of initFields(). I was
going to do it in two lines but then realised one was enough... :)

TestClass <- setRefClass ("TestClass",
       fields = list (text = "character"),
       methods = list (
               initialize = function (text) {
initFields(text=paste(text,"\n")) },
               print = function ()  { cat(text) } )
)

All the best,
Jon
On 28 October 2010 15:13, Daniel Lee <bearlee at alum.mit.edu> wrote: