[Paper Review] Enhancing reproducibility and collaboration via management of R package cohorts
This paper proposes a framework for managing R package cohorts using versioned manifests to enhance reproducibility and collaboration in scientific computing. It enables users to create, switch between, and deploy consistent software contexts via package manifests that track exact versions from diverse sources, with tools for installation, provenance tracking, and publication—demonstrated through switchr and GRANbase, released under the Artistic 2.0 license.
Science depends on collaboration, result reproduction, and the development of supporting software tools. Each of these requires careful management of software versions. We present a unified model for installing, managing, and publishing software contexts in R. It introduces the package manifest as a central data structure for representing version specific, decentralized package cohorts. The manifest points to package sources on arbitrary hosts and in various forms, including tarballs and directories under version control. We provide a high-level interface for creating and switching between side-by-side package libraries derived from manifests. Finally, we extend package installation to support the retrieval of exact package versions as indicated by manifests, and to maintain provenance for installed packages. The provenance information enables the user to publish libraries or sessions as manifests, hence completing the loop between publication and deployment. We have implemented this model across two software packages, switchr and GRANbase, and have released the source code under the Artistic 2.0 license.
Motivation & Objective
- To address the challenge of inconsistent software versions across collaborators and analyses, which undermines reproducibility in R-based research.
- To enable users to define, manage, and switch between isolated, version-specific software contexts (package cohorts) for reproducible analysis.
- To support the installation of exact package versions from non-CRAN sources, including version control systems and archived tarballs.
- To provide a mechanism for publishing and deploying reproducible software contexts as self-contained, versioned manifests.
- To close the loop between publication and deployment by enabling provenance tracking and manifest-based re-creation of software environments.
Proposed method
- Introduces the package manifest as a central data structure that lists exact package versions and their sources, including CRAN, Bioconductor, Git repositories, and local directories.
- Uses the `libManifest()` function to generate a manifest from a current library or session, capturing the full software context.
- Employs `switchTo()` and `switchBack()` functions to create and manage isolated R library environments based on manifests.
- Enables installation of exact package versions from manifests using standard R installation mechanisms, with provenance tracking for reproducibility.
- Supports publishing manifests as GitHub gists via the `switchrGist` package for easy sharing and deployment.
- Integrates with external systems like crandb to enable retroactive installation of historical package cohorts based on dates or R versions.
Experimental results
Research questions
- RQ1How can R users reliably recreate and share exact software contexts for reproducible analysis across different collaborators and timepoints?
- RQ2Can a decentralized, manifest-based system effectively manage version-specific package cohorts from diverse sources, including version control and archives?
- RQ3How can provenance information be captured and used to enable the publication and re-deployment of complete software environments?
- RQ4To what extent can historical CRAN states be approximated and used to recover software contexts when no manifest or sessionInfo is available?
- RQ5Can the framework be extended to support dynamic documents and automated reproducibility workflows in scientific publishing?
Key findings
- The package manifest model successfully captures and represents complete, version-specific software contexts, enabling consistent deployment across different environments.
- The framework allows users to switch between isolated R libraries without interfering with the default site library, ensuring reproducibility and avoiding dependency conflicts.
- Installation from manifests supports exact version retrieval from non-repository sources, including Git repositories and archived tarballs, enhancing flexibility and portability.
- Provenance tracking of installed packages enables users to publish and re-deploy entire software contexts as reusable, versioned manifests.
- Integration with crandb enables retroactive recreation of historical package cohorts based on dates or R versions, supporting reproducibility of older studies.
- The framework is demonstrated through two open-source packages—switchr and GRANbase—released under the Artistic 2.0 license, with source code available on GitHub.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.