In R, the fundamental unit of share-able code is the package. A package bundles together code, data, documentation, and tests, and is easy to share with others. There are currently over 13,000 packages available on the Comprehensive R Archive Network, or CRAN, the public clearing house for R packages. This huge variety of packages is one of the reasons that R is so successful: the chances are that someone has already solved a problem that you’re working on, and you can benefit from their work by downloading their package. Packages thus allow for easy, transparent and cross-platform extension of the R base system.

Packages can also depend on other packages as stated in the fields Depends, Imports and Suggests in each package’s meta data file DESCRIPTION. Through their dependencies packages can span a huge graph which is also referred as an entire Package Universe. Below you can find an example graph including the most downloaded packages on the RStudio CRAN mirror:

Network of most popular CRAN packages. Click for interactive version.