batch {remoter} | R Documentation |
Run a local script on a remote server in batch. Similar to R's own
source()
function.
batch(addr = "localhost", port = 55555, password = NULL, file, script, timer = FALSE)
addr |
The remote host/address/endpoint. |
port |
The port (number) that will be used for communication between the client and server. The port value for the client and server must agree. |
password |
An initial password to pass to the server. If the server is not accepting
passwords, then this argument is ignored. If the initial pasword is
incorrect, then assuming the server's |
file |
A character string pointing to the file you wish to execute/source. Either
this or |
script |
A character string containing the commands you wish to execute/source. Either
this or |
timer |
Logical; should the "performance prompt", which shows timing statistics after every command, be used? |
Note that batch()
can not be run from inside an active connection.
Its purpose is to bypass the need to start a connection via client()
Returns TRUE
invisibly on successful exit.
## Not run: library(remoter) ### NOTE first run a server via remoter::server() )in a separate R session. ### For simplicity, assume they are on the same machine. # Run a script in an R file on the local/client machine file <- "/path/to/an/R/script.r" batch(file=file) # Run a script stored in a character vector script <- "1+1" batch(script="1+1") ## End(Not run)