[Rd] importing/loading package without a namespace

Christos Hatzis christos.hatzis at nuverabio.com
Thu Sep 10 23:46:46 CEST 2009


Thank you Martin.
This has worked.  It was perhaps the suggestion to explicitly call the qcc
functions in my code via qcc::

Thanks.
-Christos 

> -----Original Message-----
> From: r-devel-bounces at r-project.org 
> [mailto:r-devel-bounces at r-project.org] On Behalf Of Martin Morgan
> Sent: Thursday, September 10, 2009 5:12 PM
> To: christos at nuverabio.com
> Cc: r-devel at r-project.org
> Subject: Re: [Rd] importing/loading package without a namespace
> 
> Hi Christos --
> 
> Christos Hatzis wrote:
> > I am developing a package that imports some functions from 
> another package.
> > The imported package (qcc) does not have a namespace and this is 
> > causing problems with loading of my package, which has a 
> namespace.  
> > Is there a workaround to allow loading the namespace-less package?
> > 
> > I searched the archives and found a suggestion that the 
> package should 
> > be included in the Depends list, but this has not helped.
> > https://stat.ethz.ch/pipermail/bioc-devel/2007-April/001079.html
> > 
> > Thank you.
> >  
> > The contents of my DESCRIPTION file are:
> >  
> > Package: nvQC
> > Type: Package
> > ...
> > Depends: R(>= 2.5.0), Biobase, qcc
> > Imports: affy, RColorBrewer, affyio, nvNormalize
> > Suggests: nvCELFiles
> > LazyLoad: no
> > LazyData: yes
> >  
> > and those of the NAMESPACE file
> > 
> > export(nv.evalQC, gridQC, control.plots) import(qcc, affy)
> 
> If I understand, qcc does not have a name space, so you 
> cannot import() it. The best you can do is, as you have done, 
> Depend: qcc. In your code, you can be unambiguous about the 
> functions you use
> 
>   qcc::someQccFunction(<etc>)
> 
> > importFrom(RColorBrewer, brewer.pal)
> > importFrom(affyio, read.celfiles)
> > importFrom(nvNormalize, norm.options)
> > 
> > The output from R CMD check nvQC
> > 
> > * using log directory 
> 'C:/Iatros01/Development/RPackages/nvQC/nvQC.Rcheck'
> > * using R version 2.9.1 (2009-06-26)
> > * using session charset: ISO8859-1
> > * checking for file 'nvQC/DESCRIPTION' ... OK
> > * checking extension type ... Package
> > * this is package 'nvQC' version '1.0.0'
> > * checking package name space information ... OK
> > * checking package dependencies ... OK
> > * checking if this is a source package ... OK
> > * checking for .dll and .exe files ... OK
> > * checking whether package 'nvQC' can be installed ... OK
> > * checking package directory ... OK
> > * checking for portable file names ... OK
> > * checking DESCRIPTION meta-information ... OK
> > * checking top-level files ... OK
> > * checking index information ... OK
> > * checking package subdirectories ... OK
> > * checking R files for non-ASCII characters ... OK
> > * checking R files for syntax errors ... OK
> > * checking whether the package can be loaded ... ERROR Loading 
> > required package: Biobase
> > 
> > Welcome to Bioconductor
> > 
> >   Vignettes contain introductory material. To view, type
> >   'openVignette()'. To cite Bioconductor, see
> >   'citation("Biobase")' and for packages 'citation(pkgname)'.
> > 
> > Loading required package: qcc
> > Error : package 'qcc' does not have a name space
> > Error: package/namespace load failed for 'nvQC'
> > Execution halted
> > 
> > It looks like this package has a loading problem: see the 
> messages for 
> > details.
> > 
> > Christos Hatzis, Ph.D.
> > Nuvera Biosciences, Inc.
> > 400 West Cummings Park
> > Suite 5350
> > Woburn, MA 01801
> > Tel: 781-938-3830
> > www.nuverabio.com <http://www.nuverabio.com/>
> > 
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>



More information about the R-devel mailing list