-
-
Notifications
You must be signed in to change notification settings - Fork 264
Installing Older Versions of RStan
All releases of RStan back to 1.3 are available from
This approach will work to (a) update the version of Stan to a newer version, (b) downdate the version of Stan to an older version, or (c) reinstall the same version.
To update, downdate, or reinstall RStan, you MUST:
- uninstall current version of RStan
- quit R
- restart R
- install new version of RStan
- quit R
- restart R
Full instructions are part of the guide to
The easiest way to do it is to install 1.3 to a different directory. By default, it will install to the first directory given by
.libPaths()
which looks like
[1] "/opt/site-library" "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
Then
install_url('https://github.com/stan-dev/rstan/releases/download/v1.3.0/rstan_1.3.0.tar.gz', args = paste0("--library=", .libPaths()[2]))
Downloading rstan_1.3.0.tar.gz from https://github.com/stan-dev/rstan/releases/download/v1.3.0/rstan_1.3.0.tar.gz
Installing package from /tmp/RtmpJLwfA3/rstan_1.3.0.tar.gz
Installing rstan
You need to make sure that you have write permissions for the folder you are trying to install to. Then to use, for example, v1.3.0 instead of v2.0.0, you can do
library(rstan, lib.loc = .libPaths()[2])
or wherever you installed v1.3.0. It won't work to have two versions of the rstan
package loaded at the same time. It will not work in Windows to detach()
one version and load the other in the same R session --- you have to restart R.