Installing Packages in R

An essential aspect to using R is installing packages.  For this reason, the current page is a guide on installing packages in R.  As always, if you have any questions or comments after reading, feel free to contact me at MHoward@SouthAlabama.edu.


To install a package in R, you must first open R.  Then, using the top menu, go to “Packages” and then “Install package(s)…”

Installing Packages in R 1

Then, a window should pop up, which asks you to select your CRAN mirror.  Typically, you should either choose the first option or the option that is closest to you geographically.  For the current example, I am choosing the USA (TX 1) option.  Click on your option and then press “OK.”

Installing Packages in R 2

Now, a new window should pop up.  Just scroll down and click on the package that you want to install, and then press “OK.”  For the current example, I am installing the “psych” package.

Installing Packages in R 3

It should then take a few seconds, but you should eventually get something like this?

Installing Packages in R 4

Did you?  If so, then your package should have installed correctly. . .unless you got an error.  If you got an error or nothing at all, you may need to search around on the internet for solutions to your issues.  If you still can’t figure it out after that, try emailing me at MHoward@SouthAlabama.edu.