Learn R Programming

Rserve (version 0.6-8.1)

self: Functions usable for R code run inside Rserve

Description

The following functions can only be used inside Rserve, they cannot be used in stand-alone R. They interact with special features of Rserve. All commands below will succeed only if Rserve has been started with r-control enable configuration setting for security reasons. self.ctrlEval issues a control command to the Rserve parent instance that evaluates the given expression in the server. The expression is only queued for evaluation which will happen asynchronously in the server (see RSserverEval for details). Note that the current session is unaffected by the command.

self.ctrlSource issues a control command to the Rserve parent instance to source the given file in the server, see RSserverSource for details.

Usage

self.ctrlEval(expr)
self.ctrlSource(file)

Arguments

expr
R expression to evaluate remotely
file
path to a file that will be sourced into the main instance

Value

  • Both functions return TRUE (invisibly).

Examples

Run this code
self.ctrlEval("a <- rnorm(10)")

Run the code above in your browser using DataLab