Using RStan 2.18.1 with rtools40

Hey all,

I’m trying to use rtools40, which @bgoodri recently suggested in another thread to get threading to work on Windows. I’m using RStan 2.18.1, which is the default release on CRAN it seems, and I can’t convince pkgbuild to use the existing rtools40 install and the inline cxx function test doesn’t work because it can’t find make. I executed the line the wiki suggests to make this work and can verify:

> writeLines(readLines(file.path(Sys.getenv("HOME"), ".Rprofile")))
Sys.setenv(BINPREF = "C:/rtools40/mingw64/bin/")

I think this kinda makes sense as make isn’t part of mingw, but I’m not sure where you’re supposed to put the rest of the paths in rtools40.

Any help appreciated! Thanks.

Use this PR