What are R Packages?

Learn what R packages are and how to install R packages in RStudio.

Another point of confusion with many new R users is the idea of an R package. R packages extend the functionality of R by providing additional functions, data, and documentation. They’re written by a worldwide community of R users and can be downloaded for free from the internet.

For example, among the many packages we’ll use in this book is the ggplot2 package (Wickham et al., 2019a) for data visualization, and the dplyr package (Wickham et al., 2019b) for data wrangling. We’ll also use the moderndive package (Kim and Ismay, 2019) and the infer package (Bray et al., 2019) for tidy and transparent statistical inference.

A good analogy for R packages is that they’re like apps we can download on a mobile phone:

Get hands-on with 1400+ tech skills courses.