Package management in R
There are three ways to install an R package. The first way is to use the install.packages()
function. For example, assume that we plan to install an R package called rattle
. We can use the following code to do this:
>install.packages("rattle")
The second way is to click Packages
on the menu bar, choose a mirror location, then find the R package from a list (see the following screenshot showing the top part of the list):

The third way to install an R package is to install it from a local ZIP file. To do so, first, manually download a ZIP file to your computer. Then click Packages
on the menu bar and choose Install package(s) from local files...
, as shown here:

To update a package, click Packages
on the menu bar, then choose Update packages...
from the drop-down menu (that is, the fifth entry in the previous screenshot). Another way to update is to use the update.packages()
function, shown here:
>update.packages("rattle")
The following table lists the most frequently...