Quantcast
Channel: curve3d can't find local function "fn" - Stack Overflow
Browsing latest articles
Browse All 4 View Live

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 Article



Image may be NSFW.
Clik here to view.

Answer 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 Article

Image may be NSFW.
Clik here to view.

Answer 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 Article

curve3d 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
Browsing latest articles
Browse All 4 View Live




Latest Images