Package 'guix.install'

Title: Install R Packages with GNU Guix
Description: This 'R' package provides a single procedure guix.install(), which allows 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'.
Authors: Ricardo Wurmus
Maintainer: Ricardo Wurmus <[email protected]>
License: GPL (>= 3)
Version: 1.0.0
Built: 2024-11-03 02:48:15 UTC
Source: https://github.com/bimsbbioinfo/guix.install

Help Index


guix.install: Install R Packages Reproducibly with Guix

Description

This 'R' package provides a single procedure guix.install(), which allows 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'.

Details

Index of help topics:

guix.install            guix.install
guix.install-package    guix.install: Install R Packages Reproducibly
                        with Guix

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(s)

Ricardo Wurmus

Maintainer: Ricardo Wurmus <[email protected]>

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

Examples

## Not run: 
guix.install("methylKit", cacheFile=tempfile())
guix.install("methylKit", profile="/home/foo/custom/.guix-profile", cacheFile=tempfile())
guix.install("methylKit", guix="/gnu/remote/bin/guix", cacheFile=tempfile())

## End(Not run)

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 ~/.Rguix/packages.scm the package is installed with Guix.

The file ~/.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 Guix project or the Guix Science project.

Usage

guix.install(package, profile = NULL, guix = "guix", archive = NULL,
  cacheFile = NULL, stdout = "", stderr = "")

Arguments

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.

profile

The target Guix profile where the package should be installed. By default this is the default Guix profile at $HOME/.guix-profile.

guix

The absolute file name of the guix executable. By default this is just guix and will be searched on the user's PATH.

archive

This argument is used to override the Guix importer's archive option, e.g. to explicitly specify that the package should be imported from Bioconductor or from a Mercurial repository.

cacheFile

The absolute file name of the file where the imported package definitions should be recorded. When NULL this is $HOME/.Rguix/packages.scm.

stdout

Use this argument to redirect or silence Guix output printed to the standard output stream. The default value is "", causing all Guix messages to be printed to the console.

stderr

Use this argument to redirect or silence Guix output printed to the standard error stream. The default value is "", causing all Guix errors to be printed to the console.

Value

This procedure is run for its side-effects.

Author(s)

Ricardo Wurmus, [email protected]

Examples

## Not run: 
guix.install("methylKit", cacheFile=tempfile())
guix.install("methylKit", profile="/home/foo/custom/.guix-profile", cacheFile=tempfile())
guix.install("methylKit", guix="/gnu/remote/bin/guix", cacheFile=tempfile())

## End(Not run)