B
INSTALLING AND USING PACKAGES
One of the major strengths of R is that
thousands of user-written packages are
available on the Comprehensive R Archive
Network (CRAN) at the R home page,http://
http://www.r-project.org/. Package installation is easy in most
cases, but there are nuances to be aware of for some of
the specialty packages.
This appendix starts with some package basics and then explains how to
load R packages from your hard drive and from the Web.
B.1 Package Basics.............................................................
R uses packages to store groups of related pieces of software. The packages
that are included with the R distribution are visible as subdirectories of your
librarydirectory in your R installation tree, as in/usr/lib/R/library.
NOTE In the R community, the termlibraryis often used in place ofpackage.
Some packages are loaded automatically when you start R, such as the
basesubdirectory. However, in order to save memory and time, R does not
load all available packages automatically.