What documentation exists for R?
What documentation exists for R?
What documentation exists for R?
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Chapter 5: R Add-On Packages 74<br />
Even more conveniently, you can install and automatically update packages from<br />
within R if you have access to repositories such as CRAN. See the help page <strong>for</strong><br />
available.packages() <strong>for</strong> more in<strong>for</strong>mation.<br />
You can use several library trees of add-on packages. The easiest way to tell R to use<br />
these is via the environment variable R_LIBS which should be a colon-separated list of<br />
directories at which R library trees are rooted. You do not have to specify the default<br />
tree in R_LIBS. E.g., to use a private tree in ‘$HOME/lib/R’ and a public site-wide tree in<br />
‘/usr/local/lib/R-contrib’, put<br />
R_LIBS="$HOME/lib/R:/usr/local/lib/R-contrib"; export R_LIBS<br />
into your (Bourne) shell profile or even preferably, add the line<br />
R_LIBS="~/lib/R:/usr/local/lib/R-contrib"<br />
your ‘~/.Renviron’ file. (Note that no export statement is needed or allowed in this file;<br />
see the on-line help <strong>for</strong> Startup <strong>for</strong> more in<strong>for</strong>mation.)<br />
5.3 How can add-on packages be used?<br />
To find out which additional packages are available on your system, type<br />
library()<br />
at the R prompt.<br />
This produces something like