I would like to use brms package for Bayesian mixed model in R. I installed, brms, rstan, rstanarm and StanHeaders packages in Rstudio. If I run the model, window pops up suggesting to install Rtools although it is already installed. I put Rtools on the first order in Path in Environmental Variables. If I press No button for Rtools installation pop -up window, following error message comes out.
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! sh: c:/Rtools/mingw_64/bin/g++: No such file or directory
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/x64/Makeconf:215: file69286a911ec5.o] Error 127
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-36~1.2/bin/x64/R CMD SHLIB file69286a911ec5.cpp 2> file69286a911ec5.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
Thanks in advance for help.
- Session info
version R version 3.6.2 (2019-12-12)
os Windows >= 8 x64
system x86_64, mingw32