rGroovy {rGroovy} | R Documentation |
Groovy Scripting Language Integration
Description
Functions that integrate the Groovy scripting language with the R Project for Statistical Computing.
Details
From Wikipedia:
"Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl, and Smalltalk. It can be used as a scripting language for the Java Platform, is dynamically compiled to Java Virtual Machine (JVM) bytecode, and interoperates with other Java code and libraries."
One powerful feature this package delivers is that it allows the developer to enhance their R script with Java and Groovy code without necessarily being required to ship jars (see Grape, below). A simple example is included here and advanced examples can be found at the project's homepage.
See Also
Examples
## Not run:
#
# Installation Example
#
# Since this package does not ship with Groovy the user needs to specify the Groovy jars prior
# to using the package -- here's an example how this is accomplished:
#
groovyJars <- list (
"C:/Temp/groovy.jars/groovy-2.4.5-indy.jar",
# OTHER JAR FILES...
)
options(GROOVY_JARS=groovyJars)
library(rGroovy)
Execute (groovyScript="print 'Hello world!'")
## End(Not run)