You want to do install and use a package.


If you are using a GUI for R, there is likely a menu-driven way of installing packages. This is how to do it from the command line:


In each new R session where you use the package, you will have to load it:


If you use the package in a script, put this line in the script.

To update all your installed packages to the latest versions available:


If you are using R on Linux, some of the R packages may be installed at the system level by the root user, and can’t be updated this way, since you won’t haver permission to overwrite them.