Command line tool to run R scripts that are annotated with rix roxygen2 tags.
- @rix date
- @rix r_ver
- @rix r_pkgs
- @rix system_pkgs
- @rix git_pkgs
These annotations will be used in {rix} to generate the nix configuration of the environment that will run the R script in a docker container.
For instance, if we have:
print(here::here("."))
We can add:
#' @rix date = "2025-09-01"
#' @rix r_pkgs = c("here")
print(here::here("."))
- Install Docker
- Dowload and extract or clone the rix-run repository and put the `rix-run+ executable file in in your PATH. For example:
$ git clone [email protected]:jrosell/rix-run.git
$ cd rix-run
$ echo "export PATH=\$PATH:~/.local/bin/" >> ~/.bashrc
$ chmod u+x rix-run
$ cp rix-run ~/.local/bin/rix-run
- Open a terminal and use rix-run to run your R scripts.
The examples/data-visualize.R file include date and r_pkgs annotated values.
Once rix-run
is installed, to run the script execute:
$ rix-run examples/data-visualize.R
The examples/targets-run1.R file is a _targets.R script file that will be executed with tar_make when using the --targets argument.
Once rix-run
is installed, to run the script execute:
$ rix-run examples/targets-run1.R --targets
The examples/quarto-render.qmd file is quarto file that will be rendered when using the --quarto argument.
Once rix-run
is installed, to run the script execute:
$ rix-run examples/quarto-render.qmd --quarto
- You will find execution logs in the rix-run-logs folder.
- It's tested on Ubuntu. If you want to help, please test other systems.
- Please, open an issue if you have any problem or suggestion.
- Feel free to open a PR to improve
rix-run
.