It uses the
Rscript program corresponding to the current R version,
to run the script. It streams
stderr of the process.
rscript(script, cmdargs = character(), libpath = .libPaths(), repos = default_repos(), stdout = NULL, stderr = NULL, poll_connection = TRUE, echo = FALSE, show = TRUE, callback = NULL, block_callback = NULL, spinner = FALSE, system_profile = FALSE, user_profile = FALSE, env = rcmd_safe_env(), timeout = Inf, wd = ".", fail_on_status = TRUE, color = TRUE, ...)
Path of the script to run.
Command line arguments.
The library path.
Optionally a file name to send the standard output to.
Optionally a file name to send the standard error to.
It may be the same as
Whether to have a control connection to the process. This is used to transmit messages from the subprocess to the parent.
Whether to echo the complete command run by
Logical, whether to show the standard output on the screen
while the child process is running. Note that this is independent
A function to call for each line of the standard
output and standard error from the child process. It works together
A function to call for each block of the standard output and standard error. This callback is not line oriented, i.e. multiple lines or half a line can be passed to the callback.
Whether to show a calming spinner on the screen while
the child R session is running. By default it is shown if
Whether to use the system profile file.
Whether to use the user's profile file.
Environment variables to set for the child process.
Timeout for the function call to finish. It can be a
base::difftime object, or a real number, meaning seconds.
If the process does not finish before the timeout period expires,
Working directory to use for running the command. Defaults to the current working directory.
Whether to throw an R error if the command returns with a non-zero status code. By default no error is thrown.
Whether to use terminal colors in the child process, assuming they are active in the parent process.
Extra arguments are passed to