The rstanarm models are precompiled so that’s probably why those run fine. Unfortunately, it’s possible that even with RTools installed the compiler won’t be found. What does Sys.getenv('PATH') path return?
Have you looked at the information at the link below?
It gives a few suggestions for checking that your setup is correct.
I believe I have the same situation here as author.
My Rtools installed at:
Output from Sys.getenv(‘PATH’) have needed parts (added by hand, Rtools installation now do not allow the step with choosing these):
Command “system(‘where make’)” shows correct location of file: C:\Rtools\bin\make.exe
Command “system(‘g++ -V’)” do not give any result.
When I run “fit <- stan(“some rstan model”)” it says: No C++ compiler found, so the following will probably not work.
As I find out rstanarm models are precompiled so it works and I can get a bunch of warning as well as output and can print and plot “fit”.
The warning which is not connected to the model I ran but potentially informs about some problem is:
“2: In system2(file.path(Sys.getenv(“R_HOME”), “bin”, Sys.getenv(“R_ARCH_BIN”), :
running command ‘“D:/Programs/R/R_350/bin//R” CMD config CXX’ had status 1”
I have Cygwin64 installed + NetBeans (may be some conflict)
May be someone know how to force Rstudio to see the G++ compiler? I double checked that g++.exe is located at “C:\Rtools\mingw_64\bin”
Thank you for your response!
At first I add what you suggested to Makevars file.
My location for it was “D:\Documents.R”
I checked and it did not worked.
I add new ‘PATH’ which included (not sure which worked):