Bruno Rodrigues, Head of the Statistics Department at the Ministry of Research and Higher Education in Luxembourg
Slides available online:
https://b-rodrigues.github.io/repro_ulisboa
Code available here:
The puzzle you know:
The puzzle with Nix:
{renv} or {groundhog}: easy to use, but:
Package manager: a tool to install and manage packages
Package: any software (not just R packages)
A popular package manager:
{rix} (website) simplifies writing Nix expressions!rix() function:renv.lock files can also serve as a starting point:rix::rix() generates a default.nix filenix-build (in terminal) or rix::nix_build() from Rnix-shell"dplyr@1.0.0")scripts/nix_expressions/01_rix_intro/scripts/nix_expressions/02_native_vscode_example/{targets}: scripts/nix_expressions/03_nix_targets_pipelinescripts/nix_expressions/04_docker/{shiny}: scripts/nix_expressions/05_shiny{rixpress}{rixpress} lets you chain processing steps in both R and Python{rix} to create a reproducible (Nix-based) execution environment for the pipelinereticulate or universal formats (JSON)list(
rxp_py_file(…), # Read a CSV with Python
rxp_py(…), # Filter with Polars
rxp_py2r(…), # Python → R transfer
rxp_r(…), # Transform in R
rxp_r2py(…), # R → Python transfer
rxp_py(…), # Another Python step
rxp_py2r(…), # Back to R
rxp_r(…) # Final step
) |> rixpress()py, r, r2py, etc.)functions.R, images…)reticulate.qmd:See scripts/rixpress_demo
Contact me if you have questions:
Obrigado!