if (FALSE) {
# to run this example an installed web browser is required
openPage(allowedFunctions = "f", allowedVariables = "res")
m <- 1
f <- function() {v * m}
setSessionVariables(list(v = 1:10, m = 2))
sendCommand("jrc.callFunction('f', [], 'res')", wait = 1)
print(res)
closePage()}
Run the code above in your browser using DataLab