*.rscalaBridge | R Documentation |
This operator compiles and executes a snippet of Scala code. All definitions are local to the supplied Scala snippet. Subsequent uses of the same code snippet skips the time-consuming compilation step. The return value is a vector or matrix of R's basic types (if possible) or an rscala reference (otherwise).
## S3 method for class 'rscalaBridge'
bridge * snippet
bridge |
A Scala bridge. |
snippet |
String providing a Scala code snippet. |
Returns a vector or matrix of R's basic types (if possible) or an rscala reference (otherwise).
^.rscalaBridge
, +.rscalaBridge
,
scala
s <- scala()
s * 'scala.util.Random.nextDouble() <= 0.75'
s(mean=10, sd=2.5) * 'mean + sd * scala.util.Random.nextGaussian()'
close(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.