I've been working on a package that requires a shared library to be loaded. I have used the NAMESPACE file to load the library according to: http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks <http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks> my shared library is "excelpoi.so" hence I have added "useDynLib(excelpoi)" to my NAMESPACE file. Prior to this change, my package was passing Rcmd check with no errors or warnings. After this change, I get 5 warnings: whita$grep 'WARN' /home/whita/dvl/excelpoi.Rcheck/00check.log * checking S3 generic/method consistency ... WARNING * checking replacement functions ... WARNING * checking foreign function calls ... WARNING * checking for missing documentation entries ... WARNING * checking for code/documentation mismatches ... WARNING whita$ Can anyone suggest a fix to those warnings. My package only has one function in it which has nothing to do with replacement and has no S3 methods. Here it is (from file excelpoi/R/excelpoi.R): write.xls <- function(x,filename,sheetName,writeColNms=T,writeRowNms=T) { if(missing(sheetName) && typeof(x)=="list") sheetName <- NULL .Call("R2xls",x,filename,sheetName,writeColNms,writeRowNms,PACKAGE="excelpoi ") } Thanks in advance, Whit [[alternative HTML version deleted]]
Does your package load cleanly under R_DEFAULT_PACKAGES=NULL? I suspect it does not load at all because your shared object does not, but env R_DEFAULT_PACKAGES=NULL R> library(excelpoi)will tell you if not. On Wed, 29 Dec 2004, Whit Armstrong wrote:> I've been working on a package that requires a shared library to be loaded. > I have used the NAMESPACE file to load the library according to: > http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks > <http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks> > > my shared library is "excelpoi.so" hence I have added "useDynLib(excelpoi)" > to my NAMESPACE file. > > Prior to this change, my package was passing Rcmd check with no errors or > warnings. After this change, I get 5 warnings: > > whita$grep 'WARN' /home/whita/dvl/excelpoi.Rcheck/00check.log > * checking S3 generic/method consistency ... WARNING > * checking replacement functions ... WARNING > * checking foreign function calls ... WARNING > * checking for missing documentation entries ... WARNING > * checking for code/documentation mismatches ... WARNING > whita$ > > Can anyone suggest a fix to those warnings. My package only has one > function in it which has nothing to do with replacement and has no S3 > methods. Here it is (from file excelpoi/R/excelpoi.R): > > write.xls <- function(x,filename,sheetName,writeColNms=T,writeRowNms=T) { > if(missing(sheetName) && typeof(x)=="list") sheetName <- NULL > > .Call("R2xls",x,filename,sheetName,writeColNms,writeRowNms,PACKAGE="excelpoi > ") > }-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Thanks for your help Prof. Ripley and Dirk. My shared lib was indeed loading (I could successfully load it manually and call the external functions). The package uses the java JNI, and one of the options I was passing to initiate the JVM was -verbose:jni. A ton of debug info was being printed to the screen every time the shared lib was loaded. I think that this output was causing problems with Rcmd check. Here is some of the output from the JVM init: [Dynamic-linking native method java.lang.StrictMath.pow ... JNI] [Dynamic-linking native method java.lang.Float.intBitsToFloat ... JNI] [Dynamic-linking native method java.lang.Double.longBitsToDouble ... JNI] [Dynamic-linking native method java.lang.Float.floatToIntBits ... JNI] [Dynamic-linking native method java.lang.Double.doubleToLongBits ... JNI] [Dynamic-linking native method java.lang.Object.registerNatives ... JNI] [Registering JNI native method java.lang.Object.hashCode] [Registering JNI native method java.lang.Object.wait] ... ... and so on. When I remove the verbose option from the JVM init (in the C code), then it passes Rcmd check w/ no problems. I have one more question on Makefile vs Makevars vs configure which I'll post separately. Thanks again for the help. Regards, Whit> -----Original Message----- > From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk] > Sent: Wednesday, December 29, 2004 11:15 AM > To: Whit Armstrong > Cc: r-devel@stat.math.ethz.ch > Subject: Re: [Rd] help with Rcmd check > > > Does your package load cleanly under R_DEFAULT_PACKAGES=NULL? > I suspect it does not load at all because your shared object > does not, but > > env R_DEFAULT_PACKAGES=NULL R > > library(excelpoi) > > will tell you if not. > > On Wed, 29 Dec 2004, Whit Armstrong wrote: > > > I've been working on a package that requires a shared library to be > > loaded. I have used the NAMESPACE file to load the library > according > > to: http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks > > <http://cran.r-project.org/doc/manuals/R-exts.html#Load%20hooks> > > > > my shared library is "excelpoi.so" hence I have added > > "useDynLib(excelpoi)" to my NAMESPACE file. > > > > Prior to this change, my package was passing Rcmd check > with no errors > > or warnings. After this change, I get 5 warnings: > > > > whita$grep 'WARN' /home/whita/dvl/excelpoi.Rcheck/00check.log > > * checking S3 generic/method consistency ... WARNING > > * checking replacement functions ... WARNING > > * checking foreign function calls ... WARNING > > * checking for missing documentation entries ... WARNING > > * checking for code/documentation mismatches ... WARNING whita$ > > > > Can anyone suggest a fix to those warnings. My package > only has one > > function in it which has nothing to do with replacement and > has no S3 > > methods. Here it is (from file excelpoi/R/excelpoi.R): > > > > write.xls <- > > function(x,filename,sheetName,writeColNms=T,writeRowNms=T) { > > if(missing(sheetName) && typeof(x)=="list") sheetName <- NULL > > > > > .Call("R2xls",x,filename,sheetName,writeColNms,writeRowNms,PACKAGE="ex > > celpoi > > ") > > } > > -- > Brian D. Ripley, ripley@stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 >
Seemingly Similar Threads
- Is it possible to create highly customized report in *.xlsformat by using R/S+?
- Makefile vs Makevars vs configure
- Help on write.xlsx library(xlsx)
- How to create multiple country's data into multiple sheets of one excel
- Redundancy canonical analysis plot problem in 3D using VEGAN, RGL, SCATTERPLOT3D and SFSMISC