Re: [Rd] R CMD check: Error in .C

2009-10-27 Thread Etienne Laliberté
Many thanks Mathieu, following your answer I did a bit more focused research and found out that because mypackage had a NAMESPACE, I had to create the following zzz.R file instead: .onLoad -function (lib, pkg) { library.dynam(mypackage, pkg, lib) } I then had a look in Writing R extensions

Re: [Rd] R CMD check: Error in .C

2009-10-27 Thread Friedrich Leisch
[ Note that this discussion really belongs to r-help, not r-devel, but a nyway. On Tue, 27 Oct 2009 09:02:12 +1300, Etienne Laliberté (EL) wrote: Many thanks Mathieu, following your answer I did a bit more focused research and found out that because mypackage had a NAMESPACE, I had

[Rd] R CMD check: Error in .C

2009-10-26 Thread Etienne Laliberté
Function/file names are hypothetical. Say I have written myfunction.R, which calls myfunction.c via .C(myfunction, ...). I've compiled successfully myfunction.c via R CMD SHLIB myfunction.c in the terminal. Then, in the R console: dyn.load(myfunction.so) source(myfunction.R) test - myfunction()

Re: [Rd] R CMD check: Error in .C

2009-10-26 Thread Duncan Murdoch
Etienne Laliberté wrote: Function/file names are hypothetical. Say I have written myfunction.R, which calls myfunction.c via .C(myfunction, ...). I've compiled successfully myfunction.c via R CMD SHLIB myfunction.c in the terminal. Then, in the R console: dyn.load(myfunction.so)

Re: [Rd] R CMD check: Error in .C

2009-10-26 Thread Mathieu Ribatet
Dear Etienne, You probably want to create a zzz.R file in the /mypkg/R/ folder which is just .First.lib - function(lib, pkg){ library.dynam(MyPkgName, package = pkg, lib.loc = lib) return(invisible(0)) } This would ensure that your shared library will be