search for: tmpgen

Displaying 1 result from an estimated 1 matches for "tmpgen".

Did you mean: tmpgenc
2011 Apr 21
1
problem subsetting of a reference class
I am trying to define subset operator for a reference class and hitting some problem i am unable to diagnose.To give an example, here is a toy class generator that is a wrapper around a list tmpGEN<-setRefClass("TMP", fields=list( namelist="list" )) tmpGEN$methods('add'=function(obj, name){ namelist[[name]]<<-obj }) tmpGEN$methods('['=function(name){ if(class(name)!="character") stop('to return cache element need to pas...