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).
Usage
# S3 method for rscalaBridge
*(bridge, snippet)
Arguments
bridge
An rscala bridge.
snippet
String providing a Scala code snippet.
Value
Returns a vector or matrix of R's basic types (if possible) or an
rscala reference (otherwise).
# NOT RUN {s <- scala()
s * 'scala.util.Random.nextDouble() <= 0.75's(mean=10, sd=2.5) * 'mean + sd * scala.util.Random.nextGaussian()'close(s)
# }# NOT RUN {# }