Debian Codegraph @

man/run.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/run.R
3 \name{run}
4 \alias{run}
5 \title{Run a script}
6 \usage{
7 run(script, ..., job = NULL, name = NULL, args = NULL, project = NULL)
8 }
9 \arguments{
10 \item{script}{The path to an \R script.}
11
12 \item{...}{Unused arguments, reserved for future expansion. If any arguments
13 are matched to \code{...}, renv will signal an error.}
14
15 \item{job}{Run the requested script as an RStudio job? Requires a recent
16 version of both RStudio and the rstudioapi packages. When \code{NULL}, the
17 script will be run as a job if possible, and as a regular \R process
18 launched by \code{\link[=system2]{system2()}} if not.}
19
20 \item{name}{The name to associate with the job, for scripts run as a job.}
21
22 \item{args}{description A character vector of command line arguments to be
23 passed to the launched job. These parameters can be accessed via
24 \code{commandArgs(trailingOnly = FALSE)}.}
25
26 \item{project}{The path to the renv project. This project will be loaded
27 before the requested script is executed. When \code{NULL} (the default), renv
28 will automatically determine the project root for the associated script
29 if possible.}
30 }
31 \value{
32 The project directory, invisibly. Note that this function is normally
33 called for its side effects.
34 }
35 \description{
36 Run an \R script, in the context of a project using renv. The script will
37 be run within an \R sub-process.
38 }