Rstan and Colab

I am unable to install rstan in Colab.

Open a notebook:

enter these cells ( or copy the notebook and run that)

rstan does not install. When I execute the r code, this is the error.

Error in library(“rstan”): there is no package called ‘rstan’

Any thoughts? Thanks so much in advance.

you should be able to use CmdStanR on colab.

I wrote some CmdStanR Colab examples when we were at CmdStan 2.23 - you should be able to use 2.24.1 by now (and soon, 2.25.0!):

examples for calculating Covid rate - Santa Clara study of spring 2020:

case study:

looked at your notebook -
the call system("apt install -y r-cran-rstan") - any complaints or warnings?

Thanks. The CmdStanR Colab examples all work on my end. Still can’t get the notebook to work using the approach I sent. No warnings or anything else printed when this executes:

system("apt install -y r-cran-rstan")

Not really sure. Thanks again.