I have successfully installed RStan on Windows 10 by following the steps here: RStan Getting Started · stan-dev/rstan Wiki · GitHub
But when I run the example:
example(stan_model, package = “rstan”, run.dontrun = TRUE)
I receive an error message. I have uninstalled RStan and installed it again, but I receive the same error. I must mention that because I do not have full admin rights on the computer, so the RStan package is installed in \userfs/myuser/w2k/R.
(The most recent versions of) R, RStudio and rtools are installed in C:\Program Files.
In case it helps, I managed to run many Stan programs (the examples and my own) from Command Prompt with no problems.
The error message is as follows:
ERROR(s) during compilation: source code errors or compiler configuration errors!
(Here I deleted some lines because of lack of space)
Compilation ERROR, function(s)/method(s) not created!
Error in compileCode(f, code, language = language, verbose = verbose) :
cc1plus.exe: fatal error: \userfs/myuser/w2k/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp: No such file or directorycompilation terminated.make: *** [C:/PROGRA~1/R/R-4.0.5/etc/x64/Makeconf:229: fileb9c6d6418e.o] Error 1
In addition: Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘C:/rtools40/usr/mingw_/bin/g++’ not found
Thank you!