[BioC] Building R packages

Douglas Bates dmbates at gmail.com
Tue Jun 21 16:24:01 CEST 2005


On 6/21/05, E Motakis, Mathematics <E.Motakis at bristol.ac.uk> wrote:
> Dear all
> 
> I am trying to build an R package in Windows 2000 that I want to upload in
> Bioconductor. I have created the man and R folders with the appropriate
> files inside and I use the command Rcmd check C:\...\roots to check whether
> the package works properly, but the following problem appears:
> 
> -------------------------------------------------------
> * using log directory 'C:/Program Files/R/rw2001/bin/roots.Rcheck'
> * checking for file 'roots/DESCRIPTION' ... OK
> * checking if this is a source package ... OK
> * checking package directory ... OK
> * checking for portable file names ... OK
> * checking package dependencies ... OK
> * checking index information ... OK
> * checking package subdirectories ... OK
> * checking R files for syntax errors ... OK
> * checking R files for library.dynam ... OK
> * checking S3 generic/method consistency ... WARNING
> Error in .try_quietly({ : Error: Unable to load R code in package 'roots'
> Execution halted
> See section 'Generic functions and methods' of the 'Writing R Extensions'
> manual.
> * checking replacement functions ... WARNING
> Error in .try_quietly({ : Error: Unable to load R code in package 'roots'
> Execution halted
> In R, the argument of a replacement function which corresponds to the right
> hand side must be named 'value'.
> * checking foreign function calls ... WARNING
> Error in .try_quietly({ : Error: Unable to load R code in package 'roots'
> Execution halted
> See section 'System and foreign language interfaces' of the 'Writing R
> Extensions' manual.
> * checking Rd files ... OK
> * checking for missing documentation entries ... ERROR
> Error in .try_quietly({ : Error: Unable to load R code in package 'roots'
> --------------------------------------------------------
> 
> Could someone tell how to correct for the warnings, please?
> 
> Regards,
> Makis

Well the warnings indicate that there is a syntax error in your R
source code.  You will need to source each of the R files in your
package separately to determine where the problem is.  It can be
something as trivial as a missing or an extra comma, which is my
typical error.

I generally do something like

base <- "roots/R"  # change to the proper directory path
nms <- list.files(base, pattern = "\.R$")
for (nm in nms) {print(nm);source(file.path(base,nm))}

That should produce an error message from one of the calls to source()
and it will occur in the file whose name has just been printed.



More information about the Bioconductor mailing list