I am trying to install RStan on my computer but need to install C++ Toolchain first. Unfortunately, the Installer Package for macOS R toolchain doesn’t work for Mojave on Mac OS X’s yet, so I’m trying to do it manually.
I found this help page, but it’s instructions are incomplete. That is, the page tells you to first install/update XCode and agree to the user’s license by opening it (which I’ve done) but it doesn’t tell you what to do next. Any help here? What do I do next?
In a last ditch effort, I tried to use the installer package for non-Mojave Mac’s (after installing XCode myself) and it doesn’t work…
After you have the toolchain installed, you should just be able to do install.packages("rstan", dependencies = TRUE) and then library(rstan) followed by stan(...).
I think I figured it out. It somehow did install C++ but to be honest I’m not sure which step did it. It was likely the XCode since the installer failed.
But the example models you run to make sure it’s working were spitting warnings about StanHeaders and I used the following code (here from coatless, thank you!)in the Mac Terminal to get it to run: