run_process | R Documentation |
Start an external process in the background, and report its completion via a deferred.
run_process(
command = NULL,
args = character(),
error_on_status = TRUE,
wd = NULL,
env = NULL,
windows_verbatim_args = FALSE,
windows_hide_window = FALSE,
encoding = "",
...
)
command |
Character scalar, the command to run. If you are
running |
args |
Character vector, arguments to the command. |
error_on_status |
Whether to reject the referred value if the program exits with a non-zero status. |
wd |
Working directory of the process. If |
env |
Environment variables of the child process. If |
windows_verbatim_args |
Whether to omit the escaping of the command and the arguments on windows. Ignored on other platforms. |
windows_hide_window |
Whether to hide the window of the application on windows. Ignored on other platforms. |
encoding |
The encoding to assume for |
... |
Extra arguments are passed to |
Deferred object.
## Not run:
afun <- function() {
run_process("ls", "-l")$
then(function(x) strsplit(x$stdout, "\r?\n")[[1]])
}
synchronise(afun())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.