Appendix AGuidance for Installing R, R Studio, JAGS, and rjags
Create a folder in a writeable directory (e.g. C:\Bayesian), and install all the programs (R, RStudio, JAGS) into this folder following the steps below.
A.1 Install R
The following are the steps to install the programming language R.
- 1.1 Go to website https://www.r‐project.org.
- 1.2 To download R, choose a CRAN mirror at webpage https://cran.r‐project.org/mirrors.html.
e.g. click the first link under category USA, which is https://cran.cnr.berkeley.edu.
This leads you to the page to download and install R.
Follow the instructions, e.g. for Windows users, select Download R for Windows.
On the following page, R for Windows, select Install R for the first time.
On the following page, select Download R x.x.x (version number) for Windows.
- 1.3 Run the R installation program to install R. When asked to Select Destination Location, select the folder created earlier, e.g.
C:\Bayesian\R‐3.3.0,
and follow the installation instructions.
A.2 Install R Studio
The following are the steps to install the R Studio editor, which provides a friendly graphical user interface for R programming.
- 2.1 Go to the R Studio website https://www.rstudio.com and select Download RStudio.
- 2.2 Select Download RStudio Desktop.
- 2.3 On the following page, select the appropriate program for your platform, e.g. RStudio x.x.xxx – Windows Vista/7/8/10.
- 2.4 Run the RStudio installation program to install RStudio. When asked to Choose Install Location, ...