[R] how to trigger variable creation?
Thomas Liebig
thomas.liebig at iais.fraunhofer.de
Fri Jun 12 10:58:34 CEST 2009
Hello R users,
i'm wondering how to trigger variable creation.
Whenever a variable is created i want my own function myFun(...) to be
started.
if (exists("x")) {rm(x)} # after removal of x
# any of these calls
x<-10 # should call myFun
x=10 # should call myFun
assign(x,10) # should call myFun
etc.
# afterwards, each of the calls
x<-15 # should not call myFun
x=15 # should not call myFun
assign(x,15) # should not call myFun
etc.
Has anyone an idea? Unfortunately, this feature is also missing in the
library trackObjs.
regards,
Thomas
--
Thomas Liebig
Fraunhofer-Institut für Intelligente Analyse- und
Informationssysteme (IAIS)
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
Email: thomas.liebig at iais.fraunhofer.de
Phone: +49 2241 142050
Fax: +49 2241 142072
More information about the R-help
mailing list