Displaying 1 result from an estimated 1 matches for "funcsymbol".
Did you mean:
findsymbol
2010 Dec 22
1
forcing evaluation of a char string argument
I'm trying to make a function to turn a regular function into an S3 generic
one. I want myMethod to be:
function(x,...) UseMethod("myMethod")
But I keep getting:
function(x,...) UseMethod(func)
Here's the function:
toGeneric<-function(func) {
env<-environment(get(func))
# default method of new generic = the original function