From D.Strbenac at garvan.org.au  Fri Sep  3 04:00:14 2010
From: D.Strbenac at garvan.org.au (Dario Strbenac)
Date: Fri,  3 Sep 2010 12:00:14 +1000 (EST)
Subject: [Rd] S4 Method Signatures
Message-ID: <20100903120014.BIP57496@gimr.garvan.unsw.edu.au>

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



[Rd] S4 Method Signatures
Dario Strbenac