<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/Rpackin</title><revhistory><revision><revnumber>6</revnumber><date>2013-03-08 10:17:55</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>5</revnumber><date>2009-11-03 15:24:00</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2009-11-03 15:23:38</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2009-11-03 15:09:38</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2009-05-15 14:51:28</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2009-05-15 14:50:38</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>How do I download R libraries?</title><para>Certain add-on shareware procedures in R, called packages, are contained in folders which contain suites of R programs. For example, to read SPSS data into R you need the code in the folder called foreign. In order to obtain these folders you go to the R home page located <ulink url="http://cran.r-project.org/">here</ulink> and click <emphasis>contributed extension packages</emphasis> and download the appropriate folder into your existing R library folder (assuming you have already downloaded a version of R). The SPSS or other data set may be placed in the bin folder located along with the library folder in the R folder which serves as R's home data directory . </para><para>Alternatively IF you know the name of the library you wish to install from the R website you can use the <emphasis>install.packages</emphasis> command to install packages directly into a R session without visiting the R website. For example </para><screen><![CDATA[install.packages(c("lme4","nlme"))]]></screen><para>and then choosing <emphasis>UK (Bristol)</emphasis> in the resulting window will download and install the libraries called lme4 and nlme. </para></section></article>