R packages can be installed in two ways: from the Terminal or from inside RStudio. Let's take a look at these.
Installing the required R packages and tools
Installing R packages from the Terminal
To install R packages from the Terminal, follow these steps:
- Open the Terminal
- Type and run the following command. Make sure to replace packagename1 with an actual package name, such as dplyr:
install.packages("packagename1")
Installing R packages from inside RStudio
To install R packages from RStudio, follow these steps:
- Open RStudio
- Click on Tools from the...