Re: [R] forcing evaluation of a char string argument

2010-12-22 Thread rballen
se) >    > toGeneric("wsx") >    wsx <- function(x, ...) UseMethod("wsx") >    wsx.default <- function (x, base = 2) >    log(x, base = base) >    > wsx >    function (x, ...) >    UseMethod("wsx") >    > wsx.def

[R] forcing evaluation of a char string argument

2010-12-22 Thread rballen
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))