Dear stan users,
I had problems installing rstan (2.18.2) under R 3.6.0 on a Windows 10 machine by following the default instructions.
The problem was with Rtools3.5. Although the line:
pkgbuild::has_build_tools(debug = TRUE)
TRUE as it should, the tool chain was not working.
After some foul language, some googling and a few hours lost I found and fixed the problem. In order to save other people from losing time I thought I just post my solution in one place.
Unlike indicated in the installing instructions, Rtools needs to be included in the system path like so:
The Makevars.win file need to include the line
CXX14=$(BINPREF)g++ -O2 -march=native -mtune=native
That’s all, hope it helps.