Hello,

If the signature of a method defines which generic it implements then I'm 
confused about why this minimal example I invented won't work :

setGeneric("myFun", function(rs, ...){standardGeneric("myFun")})
setGeneric("myFun", function(cs, ...){standardGeneric("myFun")})

setMethod("myFun", "numeric", function(rs, colour = "Blue")
{
        cat(rs*100, colour)
})

setMethod("myFun", "character", function(cs, colour = "Red")
{
        cat(cs, colour)
})

Thanks for any tips,
                    Dario.

--------------------------------------
Dario Strbenac
Research Assistant
Cancer Epigenetics
Garvan Institute of Medical Research
Darlinghurst NSW 2010
Australia

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to