Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.6%) to scientific vocabulary
Keywords
nix
peer-reviewed
reproducibility
reproducible-research
Keywords from Contributors
energy-system-model
Last synced: 9 months ago
·
JSON representation
Repository
Reproducible Data Science environments for R with Nix
Basic Info
- Host: GitHub
- Owner: ropensci
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://docs.ropensci.org/rix/
- Size: 14.8 MB
Statistics
- Stars: 318
- Watchers: 9
- Forks: 21
- Open Issues: 23
- Releases: 4
Topics
nix
peer-reviewed
reproducibility
reproducible-research
Created almost 3 years ago
· Last pushed 9 months ago
Metadata Files
Readme
Changelog
Contributing
License
Codemeta
README.Rmd
--- output: github_document --- # rix: Reproducible Environments with Nix- [Introduction](#introduction) - [Quick start for returning users](#quick-start-for-returning-users) - [Getting started for new users](#getting-started-for-new-users) - [Docker](#docker) - [Why Nix? Comparison with Docker+renv/Conda/Guix](#how-is-nix-different-from-dockerrenvgroundhogranganaminicondaguix-or-why-nix) - [Contributing](#contributing) - [Thanks](#thanks) - [Recommended reading](#recommended-reading) [](https://github.com/ropensci/rix/actions/workflows/rhub.yaml/) [](https://CRAN.R-project.org/package=rix) [](https://ropensci.r-universe.dev/rix) [](https://docs.ropensci.org/rix/) [](https://github.com/ropensci/software-review/issues/625) ```{r, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` ## Introduction `{rix}` is an R package that leverages [Nix](https://nixos.org/), a package manager focused on reproducible builds. With Nix, you can create project-specific environments with a custom version of R, its packages, and all system dependencies (e.g., `GDAL`). Nix ensures full reproducibility, which is crucial for research and development projects. Use cases include running web apps (e.g., Shiny, `{plumber}` APIs) or `{targets}` pipelines with a controlled R environment. Unlike `{renv}`, which snapshots package versions, `{rix}` provides an entire ecosystem snapshot, including system-level dependencies. While Nix has a steep learning curve, `{rix}` 1. simplifies creating Nix expressions, which define reproducible environments, also from `renv.lock` files; 2. lets you work interactively in IDEs like RStudio or VS Code, or use Nix in CI/CD workflows; 3. makes it easy to create Docker images with the right packages; 4. provides helpers that make it easy to build those environments, evaluate the same code in different development environments, and finally to deploy software environments in production.
If you want to watch a 5-Minute video introduction, click the image below:
Nix includes nearly all CRAN and Bioconductor packages, with the ability to install specific package versions or GitHub snapshots. Nix also includes Python, Julia (and many of their respective packages) as well as many, many other tools (up to 120'000 pieces of software as of writing). Expressions generated by `{rix}` point to our fork of Nixpkgs which provides improved compatibility for older versions of R and R packages, especially for Apple Silicon computers. If you have R installed, you can start straight away from your R session by first installing `{rix}` from CRAN: ```{r, eval=FALSE} install.packages("rix") ``` or the development version from R-universe (development versions will generally have fixes and newer features): ```{r, eval=FALSE} install.packages("rix", repos = c( "https://ropensci.r-universe.dev" )) ``` Now try to generate an expression using `rix()`: ```{r, eval=FALSE} library("rix") # Choose the path to your project # This will create two files: .Rprofile and default.nix path_default_nix <- "." rix( r_ver = "4.3.3", r_pkgs = c("dplyr", "ggplot2"), system_pkgs = NULL, git_pkgs = NULL, ide = "code", project_path = path_default_nix, overwrite = TRUE, print = TRUE ) ``` This will generate two files, `default.nix` and `.Rprofile` in `project_default_nix`. `default.nix` is the environment definition written in the Nix programming language, and `.Rprofile` prevents conflicts with library paths from system-installed R versions, offering better control over your environment and improving isolation of Nix environments. `.Rprofile` is created by `rix_init()` which is called automatically by the main function, `rix()`. It is also possible to provide a date instead of an R version: ```{r, eval=FALSE} # Choose the path to your project # This will create two files: .Rprofile and default.nix path_default_nix <- "." rix( date = "2024-12-14", r_pkgs = c("dplyr", "ggplot2"), system_pkgs = NULL, git_pkgs = NULL, ide = "code", project_path = path_default_nix, overwrite = TRUE, print = TRUE ) ``` It is also possible to add Python (and Python packages) and/or Julia (and Julia packages) to an environment, by passing a list of two elements to the `py_conf` argument of `rix()` (or `jl_conf` for Julia). This list needs to first specify a Python or Julia version, and then an atomic character vector of Python (Julia) packages: ```{r, eval = F} rix( date = "2025-05-21", r_pkgs = "ggplot2", py_conf = list( py_version = "3.12", py_pkgs = c("polars", "great-tables") ), jl_conf = list( jl_version = "1.10", py_pkgs = c("Arrow", "TidierData") ), overwrite = TRUE ) ``` It should be noted that while we offer the guarantee that most CRAN and Bioconductor packages are supported and installable through Nix (less than 5% of packages aren’t currently supported), the same cannot be said about Python or Julia packages. Should you require a Python or Julia but cannot successfully bulid the environment, do open an issue and we’ll see what we can do. The table below illustrates this all the different types of environment you can generate: ```{=html}
| r_ver or date | Intended use | State of R version | State of CRAN packages | State of Bioconductor packages | State of other packages in Nixpkgs |
|---|---|---|---|---|---|
| r_ver = "latest-upstream" | Start of new project where versions don’t matter | Current or previous | Outdated (up to 6 months) | Outdated (up to 6 months) | Current at time of generation |
| r_ver = "4.4.2" (or other) | Reproducing old project or starting a new project where versions don’t matter | Same as in `r_ver`, check `available_r()` | Outdated (up to 2 months if using latest release) | Outdated (up to 2 months if using latest release) | Potentially outdated (up to 12 months) |
| date = "2024-12-14" | Reproducing old project or starting a new project using the most recent date | Current at that date, check `available_dates()` | Current at that date, check `available_dates()` | Current at that date, check `available_dates()` | Potentially outdated (up to 12 months) |
| r_ver = "bleeding-edge" | To develop against the latest release of CRAN | Always current | Always current | Always current | Always current |
| r_ver = "frozen-edge" | To develop against the latest release of CRAN, but manually manage updates | Current at time of generation | Current at time of generation | Current at time of generation | Current at time of generation |
| r_ver = "r-devel" | To develop/test against the development version of R | Development version | Always current | Always current | Always current |
| r_ver = "r-devel-bioc-devel" | To develop/test against the development version of R and Bioconductor | Development version | Always current | Development version | Always current |
| r_ver = "bioc-devel" | To develop/test against the development version of Bioconductor | Always current | Always current | Development version | Always current |
Click to expand
If you're already familiar with Nix and `{rix}`, install Nix using the [Determinate Systems installer](https://determinate.systems/posts/determinate-nix-installer): (if you're using WSL, do check out the [detailed installation instructions](https://docs.ropensci.org/rix/articles/b1-setting-up-and-using-rix-on-linux-and-windows.html#windows-pre-requisites) though): ```bash curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install ``` Then, install the `cachix` client and configure our `rstats-on-nix` cache; this will install binary versions of many R packages which will speed up the building process of environments: ```bash nix-env -iA cachix -f https://cachix.org/api/v1/install ``` then use the cache: ```bash cachix use rstats-on-nix ``` You only need to do this once per machine you want to use `{rix}` on. Many thanks to [Cachix](https://www.cachix.org/) for sponsoring the `rstats-on-nix` cache! `{rix}` also includes a function called `setup_cachix()` which will configure the cache but it is recommended to use the `cachix` client instead. This is because `setup_cachix()` will not edit the files that require admin/root privileges and only edit the user-level files. This may not be enough depending on how you installed Nix. Using the `cachix` client takes care of everything. You can then use `{rix}` to build and enter a Nix-based R environment: ```{r, eval=FALSE} library(rix) path_default_nix <- "." rix( r_ver = "4.3.3", r_pkgs = c("dplyr", "ggplot2"), system_pkgs = NULL, git_pkgs = NULL, ide = "code", project_path = path_default_nix, overwrite = TRUE, print = TRUE ) ``` To build the environment, call `nix_build()` ```{r, eval=FALSE} # nix_build() is a wrapper around the command line tool `nix-build` nix_build(project_path = ".") ``` If you don't have R installed, but have the Nix package manager installed, you can run a temporary terminal session which includes R and the released version of `{rix}`: ``` nix-shell -p R rPackages.rix ``` or if you prefer the development version of `{rix}`: ``` nix-shell --expr "$(curl -sl https://raw.githubusercontent.com/ropensci/rix/main/inst/extdata/default.nix)" ``` You can then create new development environment definitions, build them, and start using them.Owner
- Name: rOpenSci
- Login: ropensci
- Kind: organization
- Email: info@ropensci.org
- Location: Berkeley, CA
- Website: https://ropensci.org/
- Twitter: rOpenSci
- Repositories: 307
- Profile: https://github.com/ropensci
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "rix",
"description": "Simplifies the creation of reproducible data science environments using the 'Nix' package manager, as described in Dolstra (2006) <ISBN 90-393-4130-3>. The included `rix()` function generates a complete description of the environment as a `default.nix` file, which can then be built using 'Nix'. This results in project specific software environments with pinned versions of R, packages, linked system dependencies, and other tools or programming languages such as Python or Julia. Additional helpers make it easy to run R code in 'Nix' software environments for testing and production.",
"name": "rix: Reproducible Data Science Environments with 'Nix'",
"codeRepository": "https://github.com/ropensci/rix",
"issueTracker": "https://github.com/ropensci/rix/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.17.3",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.5.1 (2025-06-13)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Bruno",
"familyName": "Rodrigues",
"email": "bruno@brodrigues.co",
"@id": "https://orcid.org/0000-0002-3211-3689"
},
{
"@type": "Person",
"givenName": "Philipp",
"familyName": "Baumann",
"email": "baumann-philipp@protonmail.com",
"@id": "https://orcid.org/0000-0002-3194-8975"
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Richard J.",
"familyName": "Acton",
"email": "actonr@babraham.ac.uk",
"@id": "https://orcid.org/0000-0002-2574-9611"
},
{
"@type": "Person",
"givenName": "Jordi",
"familyName": "Rosell",
"email": "jroselln@gmail.com",
"@id": "https://orcid.org/0000-0002-4349-1458"
},
{
"@type": "Person",
"givenName": "Elio",
"familyName": "Campitelli",
"email": "eliocampitelli@gmail.com",
"@id": "https://orcid.org/0000-0002-7742-9230"
},
{
"@type": "Person",
"givenName": "Lszl",
"familyName": "Kupcsik",
"email": "dev@biobits.be",
"@id": "https://orcid.org/0000-0003-3535-5496"
},
{
"@type": "Person",
"givenName": "Michael",
"familyName": "Heming",
"email": "mhem@mailbox.org",
"@id": "https://orcid.org/0000-0002-9568-2790"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Bruno",
"familyName": "Rodrigues",
"email": "bruno@brodrigues.co",
"@id": "https://orcid.org/0000-0002-3211-3689"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 2.10"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "codetools",
"name": "codetools",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=codetools"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "curl",
"name": "curl",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=curl"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "jsonlite",
"name": "jsonlite",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=jsonlite"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "sys",
"name": "sys",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=sys"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "utils",
"name": "utils"
},
"SystemRequirements": null
},
"fileSize": "2121.695KB",
"relatedLink": [
"https://docs.ropensci.org/rix/",
"https://CRAN.R-project.org/package=rix"
],
"releaseNotes": "https://github.com/ropensci/rix/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/rix/blob/main/README.md",
"contIntegration": "https://github.com/ropensci/rix/actions/workflows/rhub.yaml/",
"review": {
"@type": "Review",
"url": "https://github.com/ropensci/software-review/issues/625",
"provider": "https://ropensci.org"
},
"keywords": [
"nix",
"peer-reviewed",
"reproducibility",
"reproducible-research"
]
}
GitHub Events
Total
- Issues event: 95
- Watch event: 128
- Delete event: 34
- Issue comment event: 715
- Push event: 807
- Pull request event: 207
- Pull request review comment event: 61
- Pull request review event: 72
- Fork event: 5
- Create event: 36
Last Year
- Issues event: 95
- Watch event: 128
- Delete event: 34
- Issue comment event: 715
- Push event: 807
- Pull request event: 207
- Pull request review comment event: 61
- Pull request review event: 72
- Fork event: 5
- Create event: 36
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Bruno Rodrigues | b****o@b****o | 984 |
| Philipp Baumann | b****p@p****m | 366 |
| mischko | m****m@m****g | 204 |
| Philipp Baumann | b****p@p****e | 137 |
| CI Robot | g****i@n****m | 104 |
| Richard J. Acton | r****n@p****e | 42 |
| Bruno Rodrigues | b****s@m****u | 17 |
| Bruno Rodrigues | b****s@l****x | 16 |
| Philipp Baumann | p****n@a****h | 16 |
| Bruno Rodrigues | b****s@l****n | 15 |
| Philipp Baumann | b****ŋ@p****m | 11 |
| CI Bot | c****t | 7 |
| Jordi Rosell | j****n@g****m | 6 |
| pre-commit-ci[bot] | 6****] | 5 |
| Elio Campitelli | e****i@g****m | 2 |
| László Kupcsik | k****c@g****m | 2 |
| Rap4all - rpi | u****u@u****x | 1 |
Committer Domains (Top 20 + Academic)
ubuntu.fritz.box: 1
localhost.localdomain: 1
allianceswisspass.ch: 1
linux.fritz.box: 1
mesr.etat.lu: 1
pm.me: 1
no-reply.com: 1
proton.me: 1
mailbox.org: 1
brodrigues.co: 1
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 73
- Total pull requests: 157
- Average time to close issues: about 1 month
- Average time to close pull requests: 4 days
- Total issue authors: 18
- Total pull request authors: 7
- Average comments per issue: 5.18
- Average comments per pull request: 1.76
- Merged pull requests: 122
- Bot issues: 0
- Bot pull requests: 93
Past Year
- Issues: 69
- Pull requests: 153
- Average time to close issues: 8 days
- Average time to close pull requests: 3 days
- Issue authors: 18
- Pull request authors: 6
- Average comments per issue: 4.84
- Average comments per pull request: 1.25
- Merged pull requests: 120
- Bot issues: 0
- Bot pull requests: 92
Top Authors
Issue Authors
- b-rodrigues (21)
- mihem (14)
- philipp-baumann (11)
- joelnitta (6)
- jgeller112 (6)
- HVinther (2)
- brancengregory (2)
- pzhang-cims (1)
- jrosell (1)
- stragu (1)
- alan-groot (1)
- BlueDrink9 (1)
- artur-sannikov (1)
- zecojls (1)
- simonreif (1)
Pull Request Authors
- github-actions[bot] (93)
- b-rodrigues (32)
- mihem (16)
- philipp-baumann (11)
- RichardJActon (2)
- eliocamp (2)
- Kupac (1)
Top Labels
Issue Labels
enhancement (2)
bug (1)
documentation (1)
Pull Request Labels
bug (1)
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
proxy.golang.org: github.com/ropensci/rix
- Documentation: https://pkg.go.dev/github.com/ropensci/rix#section-documentation
- License: gpl-3.0
-
Latest release: v0.8.0
published almost 2 years ago
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
9 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 2.10 depends
- magrittr * imports
- dplyr * suggests
- janitor * suggests
- knitr * suggests
- rmarkdown * suggests
- rvest * suggests
- testthat * suggests
.github/workflows/nix.yaml
actions
- DeterminateSystems/nix-installer-action main composite
- actions/checkout v3 composite
