I would like to create a vector of functions using a two agruments function \'func\', for instance this one:
func = function(number, coefficient) {
re
Use a factory function with a closure over its argument (which will hold the value of the looping variable):
> # the factory function
> makefunc <- function(x) { x; function() x }
> funclist <- list()
> for (i in 1:3) funclist[[i]] <- makefunc(i)
> funclist[[1]]()
[1] 1
> funclist[[2]]()
[1] 2
>