0

I want to use a program called Stan within R. To do so I need to install Rtools to get the C++ compiler. According to the Stan website, I am to check the box for editing path upon installation of Rtools.

For some reason R can't seem to find the compiler.

Sys.getenv("PATH") [1] "c:\Rtools\bin;c:\Rtools\mingw_64\bin;c:\Rtools\bin;c:\MiKTeX\miktex\bin;c:\R\R-3.2\bin\i386;c:\windows;c:\windows\system32;C:\Users\a3988\AppData\Local\Microsoft\WindowsApps;"

system('g++ -v') Warning message: running command 'g++ -v' had status 127

Sys.which("g++") g++ "c:\Rtools\mingw_64\bin\G__~1.EXE"

Can anybody help? I am using R-version: 3.4.2 Rtools34 Windows10

1 Answers1

0

You first need to install the gcc compilers and then you can install Rtools: https://github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows.

user 123342
  • 463
  • 1
  • 9
  • 21