Skip to content

jrosell/rix-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lifecycle: experimental

rix-run

Command line tool to run R scripts that are annotated with rix roxygen2 tags.

Supported 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("."))

Installation

  1. Install Docker
  2. 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

  1. Open a terminal and use rix-run to run your R scripts.

Usage

Basic usage

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

Targets

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

Quarto

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

Feedback & troubleshooting

  • 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.

About

Command line tool to run R scripts that are annotated with rix roxygen2 tags.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages