This app allows the browser to call back into R by specifying an
object name, its method name and some parameters. The object then
returns JSON to the browser. Only instances of subclasses of
JsonRPCObject are allowed and for them only exported
methods may be accessed.
gWidgetsWWW2 AJAX calls, the environment that
these objects lives in is typically the global environment, rather
than an environment that is created when a gWidgetsWWW2 page
is. This allows one to share such objects across many pages. In
the examples there is a page counter and a data set provider.
This is not subclassed, but rather the function call
json_rpc_server should be made.
load(url = "JSON_RPC", port = 9000)
Load the server as Rook app.
Read rook.input, then convert from JSON
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.