Skip to content
Prev 30772 / 398506 Next

A function as argument of another function

What you wrote works if "fn" is a function.  If it is a character 
string, I would look at Venables and Ripley (2000) S Programming;  I 
believe they discuss several ways of doing that.

For certain applications of this nature, I have used constructs like 
"eval(pars(text= paste('...')))".

hth,
Spencer Graves
vito muggeo wrote: