Answer by James for curve3d can't find local function "fn"
You can temporarily attach the function environment to the search path to get it to work:testcurve3d <- function(a) { fn <- function(x,y) { x*y*a } e <- environment() attach(e)...
View ArticleAnswer by Juan Antonio Roldán Díaz for curve3d can't find local function "fn"
I have found other solution that I do not like very much, but maybe it will help you.You can create the function fn how a call object and eval this in curve3d:fn <- quote((function(x, y) {x*y*a})(x,...
View ArticleAnswer by Agriculturist for curve3d can't find local function "fn"
The eval - parse solution bypasses some worries about variable scope. This passes the value of both the variable and function directly as opposed to passing the variable or function names....
View Articlecurve3d can't find local function "fn"
I'm trying to use the curve3d function in the emdbook-package to create a contour plot of a function defined locally inside another function as shown in the following minimal...
View Article
More Pages to Explore .....