Over the last few days I put together a new package RcppAPT which interfaces the C++ library behind the awesome apt
, apt-get
, apt-cache
, ... commands and their GUI-based brethren.
The package currently implements two functions which permit search for package information via a regular expression, as well as a (vectorised) package name-based check. More to come, and contributions would be very welcome.
A few examples just to illustrate follow.
R> hasPackages(c("r-cran-rcpp", "r-cran-rcppapt"))
r-cran-rcpp r-cran-rcppapt
TRUE FALSE
This shows that Rcpp is (of course) available as a binary, but this (very new) package is (unsurprisingly) not yet available pre-built.
We can search 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>
With the (default) expression catching everything, we see a lot of packages:
R> dim(getPackages())
[1] 104431 3
R>
A bit more information is on the package page here as well as as the GitHub repo.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.