Type: | Package |
Title: | 'Rcpp' Interface to the APT Package Manager |
Version: | 0.0.10 |
Date: | 2024-11-29 |
Description: | The 'APT Package Management System' provides Debian and Debian-derived Linux systems with a powerful system to resolve package dependencies. This package offers access directly from R. This can only work on a system with a suitable 'libapt-pkg-dev' installation so functionality is curtailed if such a library is not found. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Imports: | Rcpp (≥ 0.11.0) |
LinkingTo: | Rcpp |
Suggests: | simplermarkdown |
VignetteBuilder: | simplermarkdown |
URL: | https://github.com/eddelbuettel/rcppapt, https://dirk.eddelbuettel.com/code/rcpp.apt.html |
BugReports: | https://github.com/eddelbuettel/rcppapt/issues |
RoxygenNote: | 6.1.0 |
NeedsCompilation: | yes |
Packaged: | 2024-11-29 19:21:30 UTC; edd |
Author: | Dirk Eddelbuettel |
Maintainer: | Dirk Eddelbuettel <edd@debian.org> |
Repository: | CRAN |
Date/Publication: | 2024-11-29 19:30:02 UTC |
Rcpp Interface to the APT Package Manager
Description
Debian-based systems such as Debian, Ubuntu, or their derivatives use
the APT Package Manager, commonly via programs such as apt-get
,
apt-cache
or other frontends written against the APT libraries.
This package offers a simple interface from R, mostly so that the package management system can be queried.
Details
The APT library API is described in the package libapt-pkg-doc
.
Author(s)
Dirk Eddelbuettel
Maintainer: Dirk Eddelbuettel <edd@debian.org>
References
See the libapt-pkg-doc
package on a Debian-based system.
Return Build-Depends for given packages
Description
The APT Package Management system uses a data-rich caching structure. This accessor function returns the Build-Depends for a set of packages matching the given regular expression.
Usage
buildDepends(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all (".") |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A character vector containing package names is returned.
Author(s)
Dirk Eddelbuettel
Examples
buildDepends("r-cran-rcpp$")
Display information for given packages
Description
The APT Package Management system uses a data-rich caching
structure. This accessor function displays the information for
a set of packages matching the given regular expression. It
corresponds somewhat to apt-cache showpkg pkgname
but
displays more information.
Usage
dumpPackages(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all (".") |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A boolean is returned indicating whether or not the given regular expression could be matched to source packages – but the function is invoked ' for the side effect of displaying information.
Author(s)
Dirk Eddelbuettel
Examples
dumpPackages("^r-(base|doc)-")
Return Depends for given packages
Description
The APT Package Management system uses a data-rich caching structure. This accessor function returns the Depends for a set of packages matching the given regular expression.
Usage
getDepends(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all (".") |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A data frame with four columns listing (source) package, dependend packages, comparison operator, and, where available, minimal version.
Author(s)
Dirk Eddelbuettel
Examples
reverseDepends("r-cran-rcpp$")
Retrieve Names of All Installable Packages
Description
The APT Package Management system uses a data-rich caching structure. This accessor function returns the names of installable packages for a given regular expression.
Usage
getPackages(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all ("."). |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A data frame with columns containing the package name and version (or NA if unavailable).
Author(s)
Dirk Eddelbuettel
Examples
getPackages("^r-(base|doc)-")
Test for Existence of Given Package
Description
The APT Package Management system uses a data-rich caching structure. This accessor function tests whether a given package exists.
Usage
hasPackages(pkg)
Arguments
pkg |
A character vector with name of the package |
Value
A boolean result vector is returned indicating if the package at the given position is available.
Author(s)
Dirk Eddelbuettel
Examples
hasPackages(c("r-base-core", "somethingThatDoesNotExist"))
Return Reverse-Depends for given packages
Description
The APT Package Management system uses a data-rich caching structure. This accessor function returns the Reverse-Depends for a set of packages matching the given regular expression.
Usage
reverseDepends(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all (".") |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A data frame with two column listing packages and, where available, minimal version.
Author(s)
Dirk Eddelbuettel
Examples
reverseDepends("r-cran-rcpp$")
Display information for given packages
Description
The APT Package Management system uses a data-rich caching
structure. This accessor function displays the information for
a set of packages matching the given regular expression. The
output corresponds to apt-cache showsrc pkgname
.
Usage
showSrc(regexp = ".")
Arguments
regexp |
A regular expression for the package name(s) with a default of all (".") |
Details
Note that the package lookup uses regular expressions. If only a
single package is desired, append a single $
to terminate
the expression. Ie r-cran-rcpp$
will not
return results for r-cran-rcpparmadillo
and
r-cran-rcppeigen
.
Value
A boolean is returned indicating whether or not the given regular expression could be matched to source packages – but the function is invoked ' for the side effect of displaying information.
Author(s)
Dirk Eddelbuettel
Examples
showSrc("^r-(base|doc)-")
showSrc("r-cran-rcpp") # also finds RcppEigen and RcppArmadillo
showSrc("r-cran-rcpp$") # just Rcpp
Test for Suitability of System
Description
The APT Package Management system uses a data-rich caching structure. This accessor function tests whether a given package exists.
Usage
suitable()
Details
CRAN does not manage to blacklist this package for builds where it has little to no chance of building (macOS amongt them). So we now build everywhere whether it makes sense or not.
Value
A boolean result vector is returned indicating if the system is making any sense at all.
Author(s)
Dirk Eddelbuettel
Examples
suitable()