Javier,
    This can be done very easily in R. In fact every function in R is
treated as just another object. Here's an eg.

> f1<-function(x) length(x)
> f2<-f1
> class(f1)
[1] "function"
> attributes(f1)
$source
[1] "function(x) length(x)"
> length(f1)
[1] 1
> formals(f1)
$x

So you see you can fetch any parameter of the function using the right
function.

Regards,

Arunava
2010/1/30 Javier Pérez Florido <jpflorido@gmail.com>

> Dear list,
> Is there any way to use function handle in R? I would like to do something
> like this (is written in MATLAB)
>
> handleFunction=@function1;
> handleFunction(arguments) # MATLAB knows that handleFunction is related to
> function1
>
> Thus, handleFunction can be any function, for example:
> handleFunction=@function1 or handleFunction=@function2 or
> handleFunction=@function3, etc
>
> the function call is always the same
> handleFunction(arguments)
>
> Any ideas?
> Thanks,
> Javier
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
Arunava Chakravartty
13735 Luxor Chase,
Fishers,IN 46038

	[[alternative HTML version deleted]]

