Description Usage Arguments Details Value
In run_remote
the remote commands are enclosed in wrappers that allow to capture output.
By default stderr is redirected to stdout.
If there's a genuine error, e.g., the remote command does not exist, the output is not captured. In this case, one can
see the output by setting intern
to FALSE
. However, when the command is run but exits with non-zero code,
run_remote
intercepts the generated warning and saves the output.
1 2 3 4 5 6 7 |
command |
Command to run. If run locally, quotes should be escaped once. If run remotely, quotes should be escaped twice. |
remote |
Remote machine specification for ssh, in format such as |
args |
Character vector, arguments to the command. |
verbose |
If |
shell |
Whether to execute the command in a shell |
The remote command will be put inside double quotes twice, so all quotes in cmd must be escaped twice: \\"
.
However, if the command is not remote, i.e., remote
is NULL
or empty string, quotes should be escaped
only once.
If the command itself redirects output, the stderr_redirect
flag should be set to FALSE
.
A list with components:
status
The exit status of the process. If this is NA, then the process was killed and had no exit status.
stdout
The standard output of the command, in a character scalar.
stderr
The standard error of the command, in a character scalar.
elapsed_time
The number of seconds required before this function returned an output.
Warnings are really errors here so the error flag is set if there are warnings.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.