scalaLazy | R Documentation |
Lazily Execute Functions on a Scala Bridge
scalaLazy(functions, bridge = scalaFindBridge())
functions |
A single function or list of functions. Each function takes
a Scala bridge as its only argument. These functions are called immediately
after the next time the bridge is connected. These functions are where
setup code should go, like global imports, objects, classes,
methods, etc. For example, it might equal |
bridge |
A Scala bridge from the |
Returns NULL
, invisibly.
scalaFindBridge
s <- scala()
scalaLazy(function(s) { s + 'import scala.util.Random' })
s$.new_Random()$nextDouble()
close(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.