From D.Strbenac at garvan.org.au  Tue Sep  7 07:00:24 2010
From: D.Strbenac at garvan.org.au (Dario Strbenac)
Date: Tue,  7 Sep 2010 15:00:24 +1000 (EST)
Subject: [Rd] Dispatch method on S3 or S4 class
Message-ID: <20100907150024.BIQ94758@gimr.garvan.unsw.edu.au>

Hello,

I've been attempting to make a generic method that dispatches on the first argument, which can be either an S3 or an S4 class. This is as far as I've gotten. Any suggestions about what to try next ?

library(aroma.affymetrix)
library(GenomicRanges)

setGeneric("analyse", function(x, y, ...) standardGeneric("analyse"))

setMethodS3("analyse", "AffymetrixCelSet", function(x, y, z, ...)
{
	x;
	UseMethod("analyse")
}
)

setGeneric("analyse")

setMethod("analyse", "GRangesList", function(x, y, a, b, c)
{
	x;
}
)

Thanks,
       Dario.

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



[Rd] Dispatch method on S3 or S4 class
Dario Strbenac