3

When I try to use RStan (which needs RTools to run) in R, I get the following warning message:

Warning message: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : 'c:/Rtools/mingw_/bin/g++' not found

But, when I check in the 'c:/Rtools/' folder, I find two 'mingw_' files, called 'mingw_32' and 'min_gw64', and in both folders there is already a 'bin/g++' file. Why do I get this warning then? Is it wrong to have two folders, one 32 and one 64 bits?

Anthony
  • 377
  • 2
  • 6
  • 13
  • That's strange. No it is not wrong to have these two folders. Could you try to run `Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")` and see if that works? – Stéphane Laurent Aug 12 '20 at 13:08
  • Or `Sys.setenv(WIN = "64")`. – Stéphane Laurent Aug 12 '20 at 13:11
  • 3
    The warning doesn't mean much except to say that `R CMD config CXX` did not work and hence it cannot check whether a Stan program with `# include` statements will continue to work with the next Stan parser. If you don't have any `#include` statements, then the whole thing is irrelevant. – Ben Goodrich Aug 13 '20 at 05:54

1 Answers1

0

delete your old .Rprofile and try again. This helped in my case

Uli
  • 16