DownLoadPackages


How to get R packages

 

R has many "packages" each of which contain a number of useful functions. When you load a package it takes up some memory. Hence to be efficient with memory these packages are not pre-loaded into R. When you discover you need a certain package you can download it (step 1 below). You only install it into R (step 2 below) when you need it.

 

The process works like this:

 

STEP 1 - download package

 

So far what you have done is to download the package onto you machine or network. You only need to do this once....

 

...however, the package has not been loaded into R yet, and this stage you do every time you need it. (You can always write functions with "require(PackageName)" as the first line so this will happen automatically.).

 

STEP 2 - load package into R

 

That's it!