From ligges at statistik.tu-dortmund.de  Fri Apr 13 10:40:03 2012
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Fri, 13 Apr 2012 10:40:03 +0200
Subject: [Rd] R-2.15.0 and Exporting Methods Converted To S4 Generic
In-Reply-To: <CBAC8BEE.2C4A2%proebuck@mdanderson.org>
References: <CBAC8BEE.2C4A2%proebuck@mdanderson.org>
Message-ID: <4F87E663.3020405@statistik.tu-dortmund.de>

You have to export the new generic as well.

Uwe Ligges


On 12.04.2012 20:41, Roebuck,Paul L wrote:
> Late to the show on this release, unfortunately.
> One of our production packages no longer builds under R-2.15.0
> with the following message.
>
> ** testing if installed package can be loaded
> Error: Function found when exporting methods from the namespace
> 'SuperCurve' which is not S4 generic: 'image'
>
>
> Possibly relevant clues follow:
>
> ## From R/AllGenerics.R
> if (!isGeneric("image")) {
>      setGeneric("image",
>                 function(x, ...) standardGeneric("image"))
> }
>
> We have done the same for many S3 generics, converting them
> to S4 and adding specific method-combinations as such...
>
> ## From various other R files...
> setMethod("image", signature(x="RPPA"), ...
> setMethod("image", signature(x="RPPADesign"), ...
>
> And then exported them for use outside the package.
>
> ## NAMESPACE
> import(methods)
> importFrom("graphics", image)
>
> exportClasses(....)
> exportMethods(image)
>
>
> If the problem is because of the exportMethods(), I'm left
> stumped as to how to work around this. Making our S4 objects
> useable externally was kind of the point.
>
>
> Source package available, if needed.
>
> oompa<- "http://bioinformatics.mdanderson.org/OOMPA/2.14"
> download.packages("SuperCurve", destdir=".", repos=oompa, type="source")
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] R-2.15.0 and Exporting Methods Converted To S4 Generic
Uwe Ligges