Can't install latest version of Rstan

I have a student who can’t install the latest version of Rstan because of some indexing problem with the mc-stan https site. I’ve done all I can and can’t seem to help her. We are trying

install.packages("rstan", repos = c("", getOption("repos")))

and geting “unable to index repository” errors.

But we need Rstan > 2.21.2 b/c we can’t seem to add controls to the Stan function without it. It’s worked to download with this code for all the rest of my students.

I’m a statistician, not a computer scientist, and I’m having trouble figuring out how to simply download the source file.

Any thoughts?

“unable to index repository” errors are usually caused by either filename limits or firewall settings, so that might be a place to start (at least in my experience). Would you mind clarifying what operating system you’re trying to perform the installation under?

In the meantime, you may consider trying either the experimental PR version of rstan Welcome Stan 2.27 and beyond! by hsbadr · Pull Request #887 · stan-dev/rstan ( or cmdstanr Getting started with CmdStanR • cmdstanr (