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.lie...@iais.fraunhofer.de
Phone:  +49 2241 142050
Fax:    +49 2241 142072

______________________________________________
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.

Reply via email to