Description Usage Arguments Details Value Examples
Commend line tools including ssh
for Linux, Mac OSX, Solaris,
or plink
for Windows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ssh(args = "snoweye@192.168.56.101 whoami", intern = .pbd_env$RPC.CT$intern,
wait = .pbd_env$RPC.CT$wait)
plink(args = "snoweye@192.168.56.101 whoami",
use.shell.exec = .pbd_env$RPC.CT$use.shell.exec,
pause = .pbd_env$RPC.CT$pause, intern = .pbd_env$RPC.CT$intern,
wait = .pbd_env$RPC.CT$wait)
check_exec(exec)
run_args(exec = "ssh", args = "",
use.shell.exec = .pbd_env$RPC.CT$use.shell.exec,
pause = .pbd_env$RPC.CT$pause, intern = .pbd_env$RPC.CT$intern,
wait = .pbd_env$RPC.CT$wait)
|
args |
All in text/characters that are passed to the command line. |
intern, wait |
arguments passed to |
use.shell.exec |
if |
pause |
if pause when |
exec |
either |
These functions only execute option/command on remote servers via secure client commands.
NO further input from stdin
is expected.
Outputs or errors may not be captured by R.
ssh()
starts a ssh command.
plink()
starts a plink command used by default for Windows.
check_exec()
runs a quick check on the exec (either ssh or plink)
for rpc.
run_args()
runs a rpc via either ssh
or plink
.
Mainly the message received at the command line will be returned.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
library(pbdRPC, quietly = TRUE)
rpcopt_set(user = "snoweye", hostname = "192.168.56.101")
### Check an R session.
cmd <- "Rscript -e 'sessionInfo()'"
### For Linux, Mac OSX, Solaris.
rpc(cmd = cmd, exec.type = "ssh")
### For Windows.
rpc(cmd = cmd, exec.type = "plink")
### Manually
args <- "snoweye@192.168.56.101 Rscript -e 'sessionInfo()'"
ssh(args) # Note ssh uses "-p" for server port.
plink(args) # Note plink uses "-P" for server port.
### Manually launch a remoter server at background.
user.hostname <- "snoweye@192.168.56.101"
preload <- "source ./work-my/00_devel_R"
rr <- "nohup Rscript -e 'remoter::server()' > .rrlog 2>&1 < /dev/null &"
args <- paste(user.hostname, " \"", preload, "; ", rr, "\"", sep = "")
plink(args)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.