Skip to content

Including .exe files in an R package

2 messages · sahir bhatnagar, Brian Ripley

#
I am in the process of creating a package in R which calls
pre-compiled C code i.e. '.exe' files

In reading the manual, I came across this:

"A source package if possible should not contain binary executable
files: they are not portable, and a security risk if they are of the
appropriate architecture. R CMD check will warn about them2 unless
they are listed (one filepath per line) in a file ?BinaryFiles? at the
top level of the package. Note that CRAN will no longer accept
submissions containing binary files even if they are listed."
which are no longer accepted by CRAN. If this is the case for my
situation, is there any other way to include the C code, so that CRAN
will accept the package?

thanks
#
On 13/02/2012 17:15, sahir bhatnagar wrote:
Which are only used on Windows, so presumably you forgot to mention that OS.
CRAN will neither accept packages with binary code files, nor will it 
accept packages tied to one architecture and OS (as such files would 
be).  You can do what you like provided you do not want to distribute 
the package: at that point you need to meet the conditions of the 
license and of the repository.

There are several examples of CRAN packages which compile up 
executables: arulesSequences is one.  But note that this is tricky as 
platforms such as Windows and OS X support multiple architectures in the 
same package installation.
And that does make clear that this is (or would rapidly become) a 
R-devel topic.