How-To: RStudio: Installing Packages

Question

How do I install packages onto a project in RStudio?

 

Answer

  1. Load your desired project which you would like to install packages on.
  2. Navigate to the "Files" section, then select the "Packages" tab.
  3. In the "Packages" tab, click on the "Install" button. This will bring up the "Install Packages" pop-up.

Screenshot of the "Packages" tab in RStudio, with the "Install" button highlighted.

4. In the "Install Packages" pop-up:

  • The name of the desired package can be typed into the "Packages" text box, where the drop down can be used to select the desired package.
  • Once the correct package has been selected in the "Packages" text box, press the "Install" button.

Screenshot of the "Install Packages" pop-up, with the package search shown, and the "Install" button highlighted.

5. The "Install Packages" pop-up will now close. Navigate to the "Console" tab in RStudio, and wait until the output states: "Do you want to proceed? [Y/n]:"

6. Type "Y" into the "Console" and press enter.

Screenshot of the "Console" tab in RStudio, with text stating: "Do you want to proceed? [Y/n]:" with the letter "Y" being typed at the prompt.

7. Wait for the console to output a message stating that the package or packages have successfully installed.

Screenshot of the "Console" stating: "Successfully installed 6 packages in 2.8 seconds."

8. Navigate back to the "Packages" tab, and find your new package in the "Project Library" list.

9. Check the check mark box next to your desired package and your package will be loaded into your project.

Screenshot of the "Packages" tab. In the "Project Library", the check mark box next to the desired package has been checked.

 

For Additional Assistance

For additional assistance or questions about this article, please contact itrss-support@missouri.edu

 

Print Article

Related Articles (1)

Index of RStudio guides