Checking Modificatons to .R Files

A question was raised about how one should check to make sure that MCMCpack still works after one has made changes to one or more .R files in MCMCpack/R/. The answer is below. Note that you will want to change the paths below to match your setup.


The first thing you should do is to compile the revised version of MCMCpack. If you copied the stable tree to mcmcpack/tmp/myname/ and were making changes to files in mcmcpack/tmp/myname/stable/MCMCpack/R/ then you would cd to mcmcpack/tmp/myname/stable/ and then issue

R CMD INSTALL MCMCpack -l ~/Rpackages

this will compile a local copy of MCMCpack and put it in the Rpackages directory in your home directory.

Assuming this works, you should then open R up and load the new MCMCpack library with

library(MCMCpack, lib.loc="~/Rpackages")

You should then call the functions you changed to make sure your changes are doing what they're supposed to be doing.

After all this looks ok, you should (from the same directory in which you issued the R CMD INSTALL command above) issue a


If this passes then the code should be ok.