[R] Apply parameters to a function from a list

Florian Burkart florian.burkart at whu.edu
Fri Feb 4 15:35:52 CET 2011


Hey,

this may be a simple question, but I am struggling to apply a list of 
parameters to a function.


Say I have the following function:

test<-function(a=1,b=2,c=3,d=4){a+b+c+d}

And the following list:

point<-list(a=3,d=2)

Is there a way I can evaluate function test at point?



(Apart from changing function test to take in a list, and take values 
out of the list, but I'd rather not touch test).

Thanks vm



More information about the R-help mailing list