openPage: Create a server

Description Usage Arguments

Description

openPage creates a server and establishes a websocket connection between it and the current R session. This allows commands exchange. In R use sendCommand function to send and execute JavaScript code on the server. On the server use jrc.sendCommand function to send and exectute R code in the current R session.

Usage

1
openPage(useViewer = T, rootDirectory = NULL, startPage = NULL)

Arguments

useViewer

If TRUE, the start page will be opened in the RStudio Viewer. If FALSE a default web browser will be used.

rootDirectory

A path to the root directory of the server. If rootDirectory is not defined, the http_root in the package directory will be used as a root directory.

startPage

A path to the HTML file that should be opened, when the server is initialised. This can be an absolute path to a local file, or it can be relative to the rootDirectory or to the current R working directory. If startPage is not defined, this function opens an empty HTML page. The file must have .html extension.


anders-biostat/JsRCom documentation built on May 5, 2019, 12:29 a.m.