Description Usage Arguments Details Value Examples
Run a local script on a remote server in batch. Similar to R's own
source()
function.
1 2 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.