5  Individual package information

Clicking on a package in search results or in a universe overview will lead you to homepage for that package. You can also link to this page directly via the url https://{owner}.r-universe.dev/{package}.

These package pages are generated automatically and provide detailed information about each project, and all the information and resources to quickly install and try the package locally in R.

5.1 Package information

The initial section of the homepage shows descriptive data and links to resources from this package, such as source/binary files, the package manual and NEWS file. Further down we show installation instructions to install the package in R. Installation is quick and easy because we provide pre-compiled binaries for Windows and MacOS, so no special tools or setup is required on the user machine.

Here you can also find more information derived by the build system, such as which system libraries the package builds on, topics, and if the package is on CRAN. The badges underneath show statistics about the package, such as dependencies, reverse dependencies, and GitHub stars. Clicking on the ’exports’ badge will show all functions and datasets exported by the package, which link to the respective sections in the manual page. If specified, we also show how the package should be cited in papers.

5.1.1 How are the dependencies / dependents calculated?

Both are calculated using transitive (recursive) strong dependencies, hence this includes both direct and indirect dependencies. Or in practical terms: other packages that need to be installed at minimum to be able to use the target package.

At package build time, we use tools::package_dependencies(pkg, recursive = TRUE) to derive the list of hard dependencies and store this in the database. R-base packages are not included. The dependencies value is simply the size of this list. The dependents value is the opposite: this is the number of packages in R-universe which list the target package as one of its dependencies.

5.1.2 How does R-universe analyze system dependencies (C/C++)

After the package has been installed, we use maketools to show external libraries that the package links to:

maketools::package_sysdeps("sf")
##                 shlib      package     headers source              version
## 1   libproj.so.15.3.1    libproj15 libproj-dev   proj              6.3.1-1
## 2   libgdal.so.26.0.4    libgdal26 libgdal-dev   gdal   3.0.4+dfsg-1build3
## 3 libgeos_c.so.1.13.1 libgeos-c1v5 libgeos-dev   geos        3.8.0-1build1
## 4 libstdc++.so.6.0.28   libstdc++6        <NA>    gcc 10-20200411-0ubuntu1

In a nutshell, maketools calls ldd on the installed R package to see which .so files are linked (the 1st column above). Then it uses the distro package manager (for instance dpkg) to query the runtime package deb that provides this file (the second column), and the corresponding headers and source packages. So to emphasize, this does not use heuristics / guessing based on the package description.

The maketools vignette explains this in more detail: Automatically determine run-time dependencies for R packages on Linux.

5.2 All the documentation

To let you start using packages as quickly as possible, R-universe renders all available documentation and presents this as clear and concisely as possible on the homepage.

Most R packages have 3 forms of documentation: a README file, a reference manual (help pages), and a number of articles (vignettes). These articles are often a good place to get started, and are listed on the package homepage right under the descriptives. From here you can view both the rendered html/pdf document, as well as the rmarkdown source file used to (re)produce the article.

Further down the page you can see the content from the package README. Most packages these days include a README.md file which can nicely be rendered into HTML.

After the README follows a section named “reference manual” containing a table with all the help pages. These link to the respective chapters in the html reference manual, which provide the most extensive documentation for each function in the package, including descriptions, parameters, examples, etc.

5.3 Usage and development activity

Besides familiarizing yourself with what the package does, you may be interested in who is working on it, who else is using it, and if it is still actively developed.

The “development and contributors” section shows a bar chart with the number of commits per week for the last year, and who the main contributors are. Finally the section “usage by other packages” shows other packages on R-universe depending on this package, grouped by owner. This gives you some indication on how active the project is, and who are involved.