Loading R packages
From InterSciWiki
If you run an R program and (if) the library is not found you need to install the package with that library, let's say spdep.
You might find it at the menu bar by clicking 'Packages' and then 'Load Packages.' If not then on the drop down menu click 'Install package(s)...'. After being prompted for a mirror, you will be presented with a (very long) list of the available packages; scroll down until you find your package, e.g., spdep, and click it. Some packages (such as the package 'foreign' which allows you to read files formatted for Minitab, S, SAS, SPSS, Stata, Systat, dBase, Epi Info ) are part of core R.
In our example spdep is not in core R, so you have to install it yourself. (Courtesy Anthon Eff July 2007)
Subscribe to R packages --> Subscribe to R packages newsletter
