Ari.stat
Ari.stat

Reputation: 472

Write R package build binary file on windows

I am writting a package on R with windows 10.

My package includes RcppArmadillo and BH. I used RcppArmadillo.package.skeleton() function. After that I edited the line linkingTo to that:

LinkingTo: Rcpp, RcppArmadillo, BH

I did that in order to add c++ file in src folder with depends on library BH. Everything works very well and I get the source file "vMF_1.0.tar". Now I want to build the binary (.zip) in order to share the package with other. I read many tutorials but the solutions proposed did not work with me. For instance I used these commands line in my MSDOS

RCMD INSTALL -build vMF
R CMD --build --compile-both vMF_1.0.tar.gz
R CMD build --force --binary vMF

None of three does not solve my problem. I get that --build or --binary is not an option. Can anyone help me ?

Upvotes: 3

Views: 1723

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368499

That looks like either a typo or a copy-and-paste error. Instead of

RCMD INSTALL -build vMF

do

R CMD INSTALL --build vMF

i.e. insert a space between R and CMD, and two hyphens with --build. If everything else fails, you can also upload to the win-builder service and have it build your Windows binary. You should get an email within half an hour containing a link to the build logs and artefacts—including your desired .zip.

Upvotes: 8

Related Questions