# NOT RUN {
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()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab