RcppAPT

RcppAPT provides an interface to the APT Package Manager

So what is APT?

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, apt-get, 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.

Examples

We can query packages by regular expression:

R> library(RcppAPT)
R> getPackages("^r-base-c.")
          Package      Installed       Section
1 r-base-core-dbg 3.1.2-1utopic0 universe/math
2 r-base-core-dbg           <NA> universe/math
3     r-base-core 3.1.2-1utopic0 universe/math
4     r-base-core           <NA> universe/math
R> 

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:

R> hasPackages(c("r-cran-rcpp", "r-cran-rcppapt"))
   r-cran-rcpp r-cran-rcppapt
          TRUE          FALSE 

which shows that Rcpp is (of course) available, but this (very new) package is (unsurprisingly) not available pre-built.

Status

The package is still fairly small, and functionality is (currently) limited to the examples shown above. It builds reliably on the supported systems. But libapt-pkg is pretty mature, and feature-rich, so it is mostly just a matter of extending it as needed.

Installation

The package is available via drat:

R> drat:::add("eddelbuettel")
R> install.packages("RcppAPT")

It is now also available via CRAN so a straight

R> install.packages("RcppAPT")

will work as well.

Author

Dirk Eddelbuettel

License

GPL (>= 2)

Initially created: Sat Feb 21 09:07:45 CST 2015
Last modified: Mon Feb 23 17:50:49 CST 2015