9  Installing External Libraries

There may be times when you need to perform a specific task that is not available in the base R language.

This is where external libraries come in. External libraries are additional sets of functions and tools that extend the capabilities of R.


For instance, let’s install two central R libraries: tidyverse and haven

install.packages(tidyverse)
install.packages(haven)

Once installed you need to load the library with

library(tidyverse)
library(haven)

You can also use R menu, which can be found at the top of the RStudio interface.

Tools > Install Packages