Execute command remotely

remote.execute.R(
  script,
  host = "localhost",
  user = NA,
  verbose = FALSE,
  R = "R",
  scratchdir = tempdir()
)

Arguments

script

the script to be invoked, as a list of commands.

host

settings host list

user

the username to use for remote login

verbose

should the output be printed to the console

R

Path to the R executable or binary file.

scratchdir

Path to the scratch directory for temporary files during remote execution.

Value

the captured output of the command (both stdout and stderr)

Details

Executes the given command on the remote host using ssh. If the user is set the system will login as the given user. If the host given is the local machine it will execute the command locally without ssh.

Author

Rob Kooper

Examples

if (FALSE) { # \dontrun{
  remote.execute.R('list.files()', host='localhost', verbose=FALSE)
} # }