Skip to content
Prev 2439 / 10988 Next

[Rcpp-devel] namespace error

In R:

R: library("Rcpp")
R: Rcpp.package.skeleton("Foo", module=TRUE)

Then edit file NAMESPACE to
useDynLib(Foo)
exportPattern("^[[:alpha:]]+")
import(Rcpp)
import(methods)

Then back on Terminal:
R CMD CHECK Foo ... reveals:

Error: .onLoad failed in loadNamespace() for 'Foo', details:
  call: value[[3L]](cond)
  error: failed to load module yada from package Foo
could not find function "getClass"
Execution halted

R: sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rcpp_0.9.4.2

loaded via a namespace (and not attached):
[1] tools_2.13.0