Installing R packages from inside RStudio

To install R packages from RStudio, follow these steps:

  1. Open RStudio
  2. Click on Tools from the menu bar and then click on Install Packages...:
  1. In the Install Packages dialog box, type in the package name in the Packages text box and click on the Install button:

You can also install multiple packages at the same time with both the R command line and RStudio. Just separate the individual packages with commas:

install.packages("packagename1", "packagename2")

Make sure to install all the packages that are covered in this chapter before proceeding to the next chapter.