Hi Stephane,

* Stephane DRAY <[EMAIL PROTECTED]> [041023 00:20]:
> Hello list,
> 
> I have a problem ... and do not know how to solve it.
> I would like create a function that estimate the quality of the fit of 
> different functions with different values of parameters.
> This problem is related to the following one:
> 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...
> 
> I would like that f could have a variable number of arguments. I have begin 
> to write a function:

That function has already been written for you. Lookup 'mapply' in the
online help.

HTH
Olaf

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

Reply via email to