sendData: Send data to the server

Description Usage Arguments Examples

Description

Sends a variable to the server, where it is assigned to the variable with a specified name. A JavaScript function jrc.sendData(variableName, variable) can send data back from the server to the current R session.

Usage

1
sendData(variableName, variable, keepAsVector = F)

Arguments

variableName

Name that the variable will have on the server.

keepAsVector

If TRUE, variables with length 1 will be saved as arrays on the server, otherwise they will be converted to atomic types

data

Variable to send

Examples

1
2
3
4
5
6
openPage()
x <- 1:100
sendData("x", x)
sendCommand("console.log(x);")
sendCommand("jrc.sendData('x', x.filter(function(e) {return e % 2 == 0}))")
 

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