Skip to content

RStan Transition Periods

bgoodri edited this page Jun 22, 2016 · 9 revisions

The rstan package depends on the StanHeaders package. When there is a new Stan release, the StanHeaders package is uploaded to CRAN first, which may mean that it is incompatible with the version of rstan on CRAN. During these transition periods, there are two options to obtain a working rstan installation. You can either downgrade your StanHeaders from archived CRAN sources or upgrade your rstan via a non-CRAN mechanism.

Downgrading StanHeaders

install.packages("https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.9.0.tar.gz", repos = NULL)

At this point, the old version of rstan on CRAN should work but you probably want to upgrade to the new version of rstan when it becomes available on CRAN in a few days.

Upgrading rstan

There are two ways to upgrade to the new version of rstan that circumvent the traditional CRAN-based installation mechanism.

Windows binary

install.packages("http://win-builder.r-project.org/tthSiljQwJgp/rstan_2.10.0.zip", repos = NULL, dependencies = TRUE)

From GitHub source

  1. If you do not already have the devtools package, execute install.packages("devtools").
  2. Call devtools::install_github("stan-dev/rstan", ref = "develop", subdir = "rstan/rstan", dependencies = TRUE)