Displaying 1 result from an estimated 1 matches for "solverb".
Did you mean:
solver
2006 Jun 20
1
list of interdependent functions
...a lot
Thomas
##======================================================
## An example
##======================================================
## a small list of functions
eq <- list(
f1 = function(x, K) K - x,
f2 = function(x, r, K) r * x * f1(x, K)
)
## a solver fnction which calls them
solverB <- function(eq) {
eq <- putInEnv(eq, environment()) # that's the trick
f1(3,4) + f2(1,2,3)
}
## and the final call (e.g. from the command line)
solverB(eq)
##======================================================
## One possible solution. Is there a better one???
##===============...