rGroovy: Groovy Scripting Language Integration

Description Details See Also Examples

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

rGroovy

Groovy (programming language)

Groovy

Grape

Invoke Dynamic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 ## 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)

rGroovy documentation built on May 1, 2019, 10:28 p.m.

Related to rGroovy in rGroovy...