Example R programs and commands 25. How to install a contributed R package: 1. Become superuser (Administrator on a Windows machine; nothing special on a Macintosh). 2. Start R and type install.packages("snpar") 3. Select a CRAN mirror site from which to download, from the "CRAN Mirror" panel that appears. USA (MO) is the closest. 4. Wait for R to finish installing the package. You will then have the functions in the snpar package, including runs.test(), installed on your machine in the right place for R to find them. You will also have any packages that "snpar" depends on. All these functions are available even for non-superuser, even for later R sessions. However, the newly installed contributed functions in package "snpar" are not loaded by default at R's startup. Load them with require(snpar) Then runs.test() and help(runs.test) should work as for any other R function. Loading other contributed R functions is done the same way. Find out which package they are in (use a search engine) then download and install that package just as you installed "snpar" above.