[R] Creating a list of functions
andreas.posch at boku.ac.at
Thu Jun 5 16:50:09 CEST 2008
I've been trying to create a list of function where function[[i]] should actually return the value of i.
func <- vector("list",2)
i <- 1
while (i <= 2)
func[[i]] <- function()
i <- i+1
however only returned the last value of i for each function. Any help how to achieve the solution intended would be greatly appreciated.
thanks in advance,
More information about the R-help