function
some times you want a function to alter a value for use elsewhere. While often just
newX < play(3)
works, if you want to reach out a set a variable from inside the fun, you can do this:
set<-function(x,value){
eval.parent(substitute(x<-value))
}
valX <- 51
set(valX ,10)
valX
page revision: 1, last edited: 12 Sep 2011 15:45