jrc (version 0.3.0)

setEnvironment: Set Environment

Description

Defines the outer environment of the app. Outer environment is a parent for all session environments. It is used to store variables that are common for all the client sessions. The only way to make changes outside of the outer environment is to use the global assignment operator <<- if and only if changes are made to the variable that does not exist in the outer environment.

Usage

setEnvironment(envir)

Arguments

envir

Environment to be used as outer environment.

Details

By default, an environment where app was initialized (via openPage function or with App$new() call) is used.

This function is a wrapper around setEnvironment method of class App.

Examples

Run this code
# NOT RUN {
openPage()
e <- new.env()
setEnvironment(e)

sendCommand("jrc.sendData('x', 10)", wait = 3)
print(e$x)
closePage()
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace