[Rd] putting binary files in a package

Uwe Ligges ligges at statistik.uni-dortmund.de
Sat Jun 23 17:03:43 CEST 2007



Ben Bolker wrote:
>    I have some binaries I would like to distribute with a package
> (I am not the original author; I have the source code but can't distribute
> it because it contains _Numerical Recipes_ code.  The long-term
> solution is to replace the code with new code written in R, or
> in clean C, but in the meantime ...)


So you certainly have checked that it is possible to distribute the 
binaries.


>    I'm uncertain both where they ought to go and where they
> will work (and hoping there is someplace that will satisfy
> both).  I had them in the exec/ directory: according to R-exts,
> 
>     Subdirectory 'exec' could contain additional executables the
>   package needs, typically scripts for interpreters such as the shell,
>   Perl, or Tcl. This mechanism is currently used only by a very few
>   packages, and still experimental.
> 
> I refer to the executables in the code as follows:
> 
>   if (is.null(progdir))
>     progdir <- file.path(.path.package("cpcbp"),"exec")
>   if (is.null(progname))
>       progname=paste("phillips-cpc-",.Platform$OS.type,".exe",sep="")
> 
> this installs fine on my system, and I believe I have successfully
> cross-built the package in the past.  However, when I uploaded to
> win-builder.r-project.org, I got
> 
> Warning: Impossible to run e:\temp\R-RELE~1\lib\cpcbp\exec2\PHILLI~2.EXE
> Warning: cannot open file 
> 'e:/temp/R-release/cpcbp.Rcheck\cpcout7f5579da', reason 'No such file or 
> directory'

I'll take a look and will answer privately later on.

Uwe



>   I tried putting it in inst/exec2 instead (and changing the
> directory above), but that doesn't seem to work either.  On my system
> (see below), it installs just fine ...
> 
>   any ideas?
> 
> -----------
>  > sessionInfo()
> R version 2.5.0 (2007-04-23)
> i486-pc-linux-gnu
> 
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
> 
> attached base packages:
> [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods" 
> [7] "base"    
> 
> other attached packages:
>    cpcbp  lattice     MASS
>    "0.3" "0.15-8" "7.2-34"
>  >
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list