Erin Hodgess wrote:> Hi Thomas! > > Try something like this: > > fx <- function(y) print(x*y) > > f <- function(fun,x) { > assign("x",x,env=.GlobalEnv) > fxx <- function() { > do.call(fun,list(y=3)) > } > fxx() > } > > f("fx",13) > > [1] 39 > > > Hope this helps!Thank you it works, but sorry, this is not what I want, as it assigns "x" to the global environment. Thomas