Re: [R] building packages with NAMESPACE

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Thu 08 Jul 2004 - 21:49:21 EST

Meinhard Ploner wrote:

> hi!
> I tried to build a very simple package with NAMESPACE file,
> such that datasets are loaded only dynamically.
>
> > a2 <- function(x=a1) x+4
> > a1 <- 1:10
> > package.skeleton("aaa", list=c("a1", "a2"))
>
> Then I modified the help files and added the file NAMESPACE with these 2
> lines:
> useDynLib(aaa)
> export(a1, a2)

  1. Don't export data frames.
  2. Don't useDynLib, if there is no library to be used.

=> The correct NAMESPACE file contains not more than the single line

export(a2)

Uwe Ligges

>
> Then "R CMD BUILD aaa" works fine, but "R CMD CHECK aaa" gives:
> .........
> * checking R files for syntax errors ... OK
> * checking R files for library.dynam ... OK
> * checking S3 generic/method consistency ... WARNING
> Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc,
> character.only = TRUE, verbose = FALSE) :
> package/namespace load failed
> Execution halted
> * checking for replacement functions with final arg not named 'value'
> ... WARNING
> Error in .tryQuietly({ : Error in library(package, lib.loc = lib.loc,
> character.only = TRUE, verbose = FALSE) :
> package/namespace load failed
> Execution halted
>
> Without NAMESPACE file there wasn't any error, so anybody could help me?
> Thanks
> Meinhard Ploner
>
>
> PS: version
> _
> platform powerpc-apple-darwin7.2.0
> arch powerpc
> os darwin7.2.0
> system powerpc, darwin7.2.0
> status
> major 1
> minor 8.1
> year 2003
> month 11
> day 21
> language R
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jul 08 21:57:02 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:46 EST