Runs an Rscript invocation with the project’s library paths configured, so scripts execute against the packages managed
by rv without needing to activate the project first.
By default, rv runsyncs the project library before running the script, ensuring it always
runs against a library that matches the config and lock files.
args - The Rscript arguments to run, e.g. a script path and any arguments it takes. Everything after rv run (and
--no-sync, if present) is passed through to Rscript unmodified.
--no-syncmust be first - Skip syncing the project library before running the command.
Because all other arguments are passed through to Rscript as-is, this flag must be given as the very first argument or it
will be treated as an argument to your script instead.
--r-bin <PATH> - Use the R at that path instead of the one rv finds for the project. See overriding the R versionIntroduced in rv v0.23.0
--r-version <VERSION> - Paired with --r-bin, run against an R that does not match the config. The lockfile is then neither read nor updated Introduced in rv v0.23.0
If the script contains a # /// rv block, rv run takes its configuration from there instead of from an
rproject.toml, and installs the dependencies it declares in a library kept in the cache: