asServerObject {XR}R Documentation

Generate a Server Language Expression corresponding to an R Object

Description

Returns a string that can be inserted into a server language expression. When parsed and evaluated by the server evaluator, the result will be the appropriate object or data.

Usage

asServerObject(object, prototype)

## S4 method for signature 'name'
asServerObject(object, prototype)

## S4 method for signature 'AssignedProxy'
asServerObject(object, prototype)

## S4 method for signature 'ProxyFunction'
asServerObject(object, prototype)

## S4 method for signature 'ProxyClassObject'
asServerObject(object, prototype)

Arguments

object

The R object.

prototype

The proxy for a prototype of the server language object wanted. When called from the 'AsServerObject()' method of an evaluator, this argument is supplied automatically from a class of objects for that evaluator, allowing methods to be defined specialized to the various interface evalutor classes.

Details

Methods for proxy objects and proxy class objects will produce the name under which they were assigned. The default method uses JSON to encode the object as a string and expects the server side interface to have a function objectFromJSON() to decode the string.

Methods (by class)

References

Chambers, John M. (2016) Extending R, Chapman & Hall/CRC. ( Chapter 13, discussing this package, is included in the package: ../doc/Chapter_XR.pdf.)


[Package XR version 0.7.2 Index]