Skip to content
Prev 15211 / 63424 Next

eapply weirdness/bug

<Mark.Bravington@csiro.au> writes:
It's probably related to the fact that
Error in 1 + "hi" : non-numeric argument to binary operator

I.e., you cannot construct calls with a mode call argument by
substituting the value of the mode call object. (Got that? Point is
that the substitute returns quote(length(1+"hi")))

It is not clear to me that there is a nice way of fixing this. You
probably need to construct calls of the form FUN(env$var) -- I suspect
that with(env, FUN(var)) or eval(FUN(var), env) would looking for
trouble. Hmm, then again, maybe it could work if FUN gets inserted as
an anonymous function...