Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Installing Older Versions of RStan

Bob Carpenter edited this pageMay 23, 2020 ·1 revision

Previous releases of RStan

All releases of RStan back to 1.3 are available from

Updating, Downdating, or Reinstalling RStan

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, youMUST:

  1. uninstall current version of RStan
  2. quit R
  3. restart R
  4. install new version of RStan
  5. quit R
  6. restart R

Full instructions are part of the guide to

Running Multiple Versions of RStan

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.gzInstalling package from /tmp/RtmpJLwfA3/rstan_1.3.0.tar.gzInstalling 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 therstan package loaded at the same time. It will not work in Windows todetach() one version and load the other in the same R session --- you have to restart R.

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp