[Bioc-devel] class union with AffyBatch

Audrey Kauffmann audrey at ebi.ac.uk
Fri Oct 10 11:12:11 CEST 2008


Hi Martin,

Sorry for the "typo", of course I meant importClassesFrom("affy", 
"AffyBatch").
Anyway, I think the import("methods") was the missing part. By updating 
R and adding this, it worked and now I do not have the warning any more.
Thanks a lot,
Audrey



Martin Morgan wrote:
> Hi Audrey --
>
> audrey <audrey at ebi.ac.uk> writes:
>
>   
>> Hi all,
>>
>> In my package, I am trying to set a class union the following way:
>> setClassUnion("OneColour", c("ExpressionSet", "AffyBatch"))
>>
>> In the NAMESPACE if I write the following:
>> importClassesFrom("Biobase", "ExpressionSet")
>> importClassesFrom("Biobase", "AffyBatch")
>>     
>
> definitely the last line is not correct.
>
>   
>> When I build the package I have this error message
>> Error: package 'affy' does not have a name space
>> Execution halted
>>
>> If I remove the importClassesFrom("Biobase", "AffyBatch") from my
>> NAMESPACE, I have this warning:
>> Warning in .findOrCopyClass(class1, classDef, where, "superClass") :
>>   Class "AffyBatch" is defined (with package slot "affy") but no
>> metadata object found to revise superClass information---not exported?
>> Making a copy in package "arrayQualityMetrics"
>>
>> In the dependencies in the DESCRIPTION, I do depend on the package
>> "affy". This is using R2.8 and affy_1.19.0.
>>
>> Any idea on how I could solve that? Is it possible to import a class
>> from a package that does not have a namespace?
>>     
>
> I think there's something else going on. If I create a package with
>
> DESCRIPTION
> -----------
> Depends: affy
> Imports: Biobase, methods
>
> NAMESPACE
> ---------
> import(methods)
> importClassesFrom(Biobase, "ExpressionSet")
> exportClasses("OneColour")
>
> R/tmp.R
> -------
> setClassUnion("OneColour", c("ExpressionSet", "AffyBatch"))
>
> I can build and check without error with
>
>   
>> R --version
>>     
> R version 2.8.0 beta (2008-10-09 r46680)
>
> In arrayQualityMetrics, if I add a file like tmp.R, move methods to
> Imports: (thinking that the end user doesn't need access to the
> functionality of the methods package to use my package), add
> imports(methods) and exportClasses("OneColour") then again I can build
> and check without errors / warnings.
>
> My only real suggestion is to update R.
>
> Sorry to be less than helpful
>
> Martin
>
>   
>> Thanks
>> Audrey
>>
>> -- 
>> Audrey Kauffmann
>> EMBL - EBI
>> Cambridge UK
>> http://www.ebi.ac.uk/~audrey
>>
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>     
>
>   

-- 
Audrey Kauffmann
EMBL - EBI
Cambridge UK
http://www.ebi.ac.uk/~audrey



More information about the Bioc-devel mailing list