summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-04-06 23:08:02 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-04-07 09:23:44 +0200
commitcf1d72acd76eb89a463d3d31393051eae02a921f (patch)
tree439e75bddc8e06520a0cbed94d82a74f84a32103
parent2f5e7601eff06ea9f8c8f74682ac976e51ab93b7 (diff)
Add minimal R package files and directories.
-rw-r--r--.Rbuildignore1
-rw-r--r--DESCRIPTION21
-rw-r--r--NAMESPACE1
-rw-r--r--man/guix.install-package.Rd40
-rw-r--r--man/guix.install.Rd65
5 files changed, 128 insertions, 0 deletions
diff --git a/.Rbuildignore b/.Rbuildignore
new file mode 100644
index 0000000..a40c534
--- /dev/null
+++ b/.Rbuildignore
@@ -0,0 +1 @@
+^manifest.scm \ No newline at end of file
diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..f6e1bb2
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,21 @@
+Package: guix.install
+Type: Package
+Title: Install R Packages with GNU Guix
+Version: 1.0.0
+Date: 2022-04-06
+Author: Ricardo Wurmus
+Maintainer: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
+Description: This R package provides a single procedure guix.install,
+ which allows R users to install R packages via Guix right from within
+ their running R session. If the requested R package does not exist
+ in Guix at this time, the package and all its missing dependencies
+ will be imported recursively and the generated package definitions
+ will be written to ~/.Rguix/packages.scm. This record of imported
+ packages can be used later to reproduce the environment, and to add
+ the packages in question to a proper Guix channel (or Guix itself).
+ guix.install not only supports installing packages from CRAN, but
+ also from Bioconductor or even arbitrary git or mercurial
+ repositories, replacing the need for installation via devtools.
+Depends: R (>= 3.6.0)
+Imports: RUnit
+License: GPL (>= 3) \ No newline at end of file
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..30ebb35
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1 @@
+export("guix.install")
diff --git a/man/guix.install-package.Rd b/man/guix.install-package.Rd
new file mode 100644
index 0000000..9abf4de
--- /dev/null
+++ b/man/guix.install-package.Rd
@@ -0,0 +1,40 @@
+\name{guix.install-package}
+\alias{guix.install-package}
+\encoding{UTF-8}
+\docType{package}
+\title{guix.install: Install R Packages Reproducibly with Guix}
+\description{
+\packageDescription{guix.install}
+}
+\details{
+
+\packageIndices{guix.install}
+
+This package lets you install any R package through Guix from within a
+running R session. If a desired R package is not yet available in any
+of your Guix channels, this package will leverage the recursive package
+importing facilities that Guix provides and transparently import
+packages from CRAN, Bioconductor, or any Mercurial or Git repository
+before installing them with Guix.
+
+This replaces the need for installers like devtools and exposes
+reproducible package management features through a familiar interface
+within R.
+}
+\author{
+\packageAuthor{guix.install}
+
+Maintainer: \packageMaintainer{guix.install}
+}
+\references{
+Courtès L., Wurmus R. (2015) Reproducible and User-Controlled Software Environments in HPC with Guix. In: Hunold S. et al. (eds) Euro-Par 2015: Parallel Processing Workshops. Euro-Par 2015. Lecture Notes in Computer Science, vol 9523. Springer, Cham. \doi{10.1007/978-3-319-27308-2_47}
+}
+\keyword{ package }
+\keyword{ utilities }
+\examples{
+\dontrun{
+guix.install("methylKit")
+guix.install("methylKit", profile="/home/foo/custom/.guix-profile")
+guix.install("methylKit", guix="/gnu/remote/bin/guix")
+}
+}
diff --git a/man/guix.install.Rd b/man/guix.install.Rd
new file mode 100644
index 0000000..b071377
--- /dev/null
+++ b/man/guix.install.Rd
@@ -0,0 +1,65 @@
+\name{guix.install}
+\alias{guix.install}
+\encoding{UTF-8}
+\title{guix.install}
+\description{
+ This procedure installs a given package with Guix. If the package is
+ available in any enabled Guix channel, the package and its
+ dependencies will be installed from there.
+
+ If the package is not available in Guix the procedure attempts to
+ generate a package definition by recursively importing metadata from
+ CRAN, Bioconductor, or a git/mercurial repository. Upon successful
+ generation of package definitions in \code{~/.Rguix/packages.scm} the
+ package is installed with Guix.
+
+ The file \code{~/.Rguix/packages.scm} is only appended to for
+ reproducibility reasons. Each entry has a comment with a timestamp
+ for convenience. The package definitions in that file could be
+ upstreamed to a Guix channel to make it easier for others to reproduce
+ the environment. Consider sending package definitions to either the
+ \href{https://guix.gnu.org/en/contribute/}{Guix project} or the
+ \href{https://github.com/guix-science/guix-science}{Guix Science project}.
+}
+\usage{
+guix.install(package, profile = NULL, guix = "guix", archive = NULL)
+}
+\arguments{
+ \item{package}{
+ The name of the R package to be installed as used on CRAN or
+ Bioconductor, or a HTTP URL of a git repository holding an R
+ package.
+ }
+ \item{profile}{
+ The target Guix profile where the package should be installed. By
+ default this is the default Guix profile at
+ \code{$HOME/.guix-profile}.
+ }
+ \item{guix}{
+ The absolute file name of the \code{guix} executable. By default
+ this is just \code{guix} and will be searched on the user's \code{PATH}.
+ }
+ \item{archive}{
+ This argument is used to override the Guix importer's \code{archive}
+ option, e.g. to explicitly specify that the package should be imported
+ from Bioconductor or from a Mercurial repository.
+ }
+}
+\value{
+ This procedure is run for its side-effects.
+}
+\author{
+ Ricardo Wurmus, \email{ricardo.wurmus@mdc-berlin.de}
+}
+
+\examples{
+\dontrun{
+guix.install("methylKit")
+guix.install("methylKit", profile="/home/foo/custom/.guix-profile")
+guix.install("methylKit", guix="/gnu/remote/bin/guix")
+}
+}
+
+\keyword{ utilities }
+\concept{ package management }
+\concept{ reproducibility }