install.packages(type="source") on Windows: unexpected behavior RRS feed

  • Question

  • I'm currently only running MRO Rgui on Windows 10 (not using RStudio or RTVS)

    I've installed the MRAN versions of Rcpp, RcppEigen & Matrix packages. However, when I install the latest version of my own package from source, it uses g++ not cl. Is there a way to configure MRO so that it compiles packages with Visual Studio?

    Microsoft R Open 3.2.5
    Default CRAN mirror snapshot taken on 2016-05-01
    The enhanced R distribution from Microsoft
    Visit for information
    about additional features.

    Multithreaded BLAS/LAPACK libraries detected. Using 4 cores for math algorithms.

    > getwd()
    [1] "E:/MRO/R-3.2.5/bin/x64"
    > install.packages("/Dropbox/jobs/Warwick_Girolami/SERRS/serrs/code/serrsBayes_0.1-25.tar.gz", type="source")
    Installing package into ‘D:/Users/Matthew/Documents/R/win-library/3.2’
    (as ‘lib’ is unspecified)
    inferring 'repos = NULL' from 'pkgs'
    * installing *source* package 'serrsBayes' ...
    ** libs
    g++ -m64 -I"E:/MRO/R-3.2.5/include" -DNDEBUG    -I"D:/Users/Matthew/Documents/R/win-library/3.2/Rcpp/include" -I"D:/Users/Matthew/Documents/R/win-library/3.2/RcppEigen/include" -I"c:/applications/extsoft/include"  -fopenmp   -O2 -Wall  -mtune=core2 -c RcppExports.cpp -o RcppExports.o
    g++ -m64 -I"E:/MRO/R-3.2.5/include" -DNDEBUG    -I"D:/Users/Matthew/Documents/R/win-library/3.2/Rcpp/include" -I"D:/Users/Matthew/Documents/R/win-library/3.2/RcppEigen/include" -I"c:/applications/extsoft/include"  -fopenmp   -O2 -Wall  -mtune=core2 -c mixLorentz.cpp -o mixLorentz.o
    mixLorentz.cpp: In function 'Eigen::ArrayXi resampleParticles(Rcpp::NumericVector, Rcpp::NumericMatrix, Rcpp::NumericMatrix, Rcpp::NumericMatrix, Rcpp::NumericVector, int, int)':
    mixLorentz.cpp:229:18: warning: unused variable 't1' [-Wunused-variable]
    mixLorentz.cpp:229:21: warning: unused variable 't2' [-Wunused-variable]
    mixLorentz.cpp: In function 'long int marginalMetropolisUpdate(Eigen::MatrixXd, unsigned int, Eigen::VectorXd, Eigen::VectorXd, Eigen::VectorXd, Rcpp::NumericMatrix, Rcpp::NumericMatrix, Rcpp::NumericVector, Rcpp::NumericMatrix, Rcpp::NumericVector, Eigen::VectorXd, Rcpp::List)':
    mixLorentz.cpp:437:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    mixLorentz.cpp:458:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    mixLorentz.cpp:525:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    mixLorentz.cpp:374:10: warning: unused variable 'priorScaleMu' [-Wunused-variable]
    mixLorentz.cpp:375:10: warning: unused variable 'priorScaleSD' [-Wunused-variable]
    g++ -m64 -shared -s -static-libgcc -o serrsBayes.dll tmp.def RcppExports.o mixLorentz.o -fopenmp -Lc:/applications/extsoft/lib/x64 -Lc:/applications/extsoft/lib -LE:/MRO/R-3.2.5/bin/x64 -lR
    installing to D:/Users/Matthew/Documents/R/win-library/3.2/serrsBayes/libs/x64
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    * DONE (serrsBayes)
    > library(serrsBayes)
    Loading required package: Matrix

    Thursday, June 2, 2016 9:54 PM