R CMD command in the background
The child process is started in the background, and the function return immediately.
rcmd_bg(cmd, cmdargs = character(), libpath = .libPaths(), stdout = "|", stderr = "|", poll_connection = TRUE, repos = default_repos(), system_profile = FALSE, user_profile = FALSE, env = rcmd_safe_env(), wd = ".", supervise = FALSE, ...)
Command to run. See
R --helpfrom the command line for the various commands. In the current version of R (3.2.4) these are:
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
stdout, in which case standard error is redirected to standard output. It can also be the special string
"2>&1", in which case standard error will be redirected to standard output.
Whether to have a control connection to the process. This is used to transmit messages from the subprocess to the parent.
NULL, then no
reposoption is set. This options is only used if
FALSE, as it is set using the system or the user profile.
Whether to use the system profile file.
Whether to use the user's profile file.
Environment variables to set for the child process.
Working directory to use for running the command. Defaults to the current working directory.
Whether to register the process with a supervisor. If
TRUE, the supervisor will ensure that the process is killed when the R process exits.
Extra arguments are passed to the processx::process constructor.
It returns a process object.