Debian and its derivatives like Ubuntu utilize a powerful package managing backend / frontend combination in APT (A Packaging Tool). Accessible at the command-line via front-ends
apt-cache, … as well as numerous GUI variants, it is implemented using a library
libapt-pkg. This small package provides R with access to this library via Rcpp.
We can query packages by regular expression:
which returns a data frame with name, version (if installed) and section.
We can also check for installability of a given package or set of packages:
which shows that Rcpp is (of course) available, but this (very new) package is (unsurprisingly) not available pre-built.
Moreover, we can look at the package information of a given package. The
buildDepends() function extracts just the build dependencies:
dumpPackages() functions display even more information.
We can also look at reverse dependencies:
The package is still fairly small, and functionality is (currently) limited to the examples shown above. It builds reliably on the supported systems.
libapt-pkg is pretty mature, and feature-rich, so this package acts mostly as a wrapper from R.
The package is on CRAN so a very standard
will do. Make sure you install the libapt-pkg-dev package first as it is a build-dependency.
Versions of the package may also be available via drat via:
GPL (>= 2)