Skip to content
Prev 295366 / 398502 Next

Creating functions with a loop.

You can do what you want with the get() and assign() functions, though
it might be easier and better to use match.fun() than get()

Much better though would be to build your functions in a list and call
the n-th element of the list with syntax like

f.list[[3]](4)

will call the function in the third element of the list with argument 4.

Best,
Michael

On Tue, May 22, 2012 at 1:24 PM, Etienne Larriv?e-Hardy
<etienne.larrivee-hardy.1 at ulaval.ca> wrote: