See: Description
| Package | Description |
|---|---|
| io.onetapbeyond.opencpu.r.executor |
A Java library providing a lightweight solution (~13 kB jar) for integrating R analytics executed on the OpenCPU server into any application running on the JVM. The OpenCPU server provides an execution environment for scientific computing, reproducible research and data analysis based on R. To learn more about the OpenCPU server, see here. To learn more about the general capabilities of the R programming language and environment for statistical computing, see here.
This library provides the following OpenCPU integration support:
OCPUTask, no boilerplate java.net code required.
OCPUTask and OCPUResult serialization.
When working with this library the basic usage pattern is as follows:
OCPUTask oTask = OCPU.R().pkg(pName).function(fName).input(fInput).library(); OCPUResult oResult = oTask.execute(); Map oData = oResult.data();
For example, the following code snippet demonstrates the execution of the R stats::rnorm function:
Map data = new HashMap();
data.put("n", 10);
data.put("mean", 5);
OCPUTask oTask = OCPU.R().pkg("stats").function("rnorm").input(data).library();
OCPUResult oResult = oTask.execute();
Map oData = oResult.data();