Stephane DRAY <dray <at> biomserv.univ-lyon1.fr> writes: : I would like to create a function "evaluatemyfunction" which evaluate a : function f for different values of parameters. For instance, if : f=function(a,b) a*b : evaluatemyfunction(f,1:10,5) would return: : 5 : 10 : 15... :
This is not a general solution (Olaf has already provided that) but in some cases you may simply be able to write your function f so that it takes vector arguments. For example, with the f you have above one could write f(1:10,5) . ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
