[R] building packages with NAMESPACE

Meinhard Ploner meinhardploner at gmx.net
Thu Jul 8 11:25:27 CEST 2004


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)

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




More information about the R-help mailing list