############ Windows Installation ############ IMPORTANT: Make sure you are connected to the web. Open the R-GUI and click on Packages --> Install Packages from CRAN --> Choose your favourite mirror. A box will appear showing all the packages available for installation, They are arranged alphabetically. Select spBayes from the menu and click OK. The installation procedure starts immediately. You can see the progress on your screen. After installation is complete, you are asked: "Do you want to save downloaded files?" There is no need for you to save downloaded files for running spBayes. Note: spBayes depends on packages "akima", "lattice" and "coda" which you may want to install either together or prior to spBayes. Invoking spBayes is done by typing: > library(spBayes) after the installation. ############ Linux Installation ############ Create or choose a directory where you want to install the packages. The default destination for these libraries is a directory named "library" under your R installattion tree. You may not be having administrator privileges to write to that directory. So, create a directory under your home directory. For example: mkdir ~/RPackages in your home directory. Next set the environment variable R_LIBS on your shell. For example, if using bash, add the following in your .bashrc file: export R_LIBS = ~/RPackages IMPORTANT: Make sure you are connected to the web. Invoke R and use the function: install.packages(pkgs, lib="~/RPackages", repos="http://cran.us.r-project.org") where pkgs is the list of packages you want installed. For example pkgs can be c("akima", "coda", "lattice", "spBayes") To update, use: update.packages(pkgs, lib="~/RPackages", repos="http://cran.us.r-project.org") MAKING IT ROUTINE: In fact it is better to create a script file, say MyInstall.R containing: MyInstall <- function(pkgs) { install.packages(pkgs, lib="~/RPackages", repos="http://cran.us.r-project.org") } MyUpdate <- function(pkgs) { update.packages(pkgs, lib="~/RPackages", repos="http://cran.us.r-project.org") } and just use MyInstall(pkgs) or MyUpdate(pkgs) to do the job.