Write R package build binary file on windows

Viewed 1215

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 ?

1 Answers

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

RCMD INSTALL -build vMF

do

R CMD INSTALL --build vMF

ie a space between R and CMD and two hyphen 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 build logs and artefacts -- including your desire .zip.

Related