Installing an R Package

The RCE provides almost all stable libraries maintained in the Comprehensive R Archive Network (CRAN), and others. For a full list refer to "Which R packages are available?"

If you locate an R library that is not available in the RCE, contact us and request we install that library. When the we install a library, it is available for use by all RCE users.

If you would like to install a library separately for your own personal use, follow these instructions:

  1. In R, type library(<package_name>).

    For example, to install R Commander, type the following:

    > library(Rcmdr)

    R prompts you with a warning if the package that you chose to install uses other packages that are not installed already.

  2. To install missing packages on which your target package depends:

    1. Click Yes to continue.

      The Install Missing Packages window is displayed.

    2. Click OK to continue.

      R prompts you to select a mirror site from which to download the packages' sources.

  3. Select a site from which to download the sources, and then click OK.

    The dependent packages and your target package are now installed. If it is an executable, the function is executed.

The sequence of activity that occurs in R by performing this installation is:

> library(Rcmdr)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: car
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.us.r-project.org/src/contrib/RODBC_1.1-7.tar.gz'
Content type 'application/x-tar' length 79624 bytes
opened URL

downloaded 77Kb

* Installing *source* package 'RODBC' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes

The downloaded packages are in

Rcmdr Version 1.2-0