The component has been contributed to apache-extra and will be maintained within their repository. Please checkout the sources directly from Camel Extra to get the latest version of the code.
The sources within this repository provide an Apache Camel
RCode component to integrate with the statistics environment R
via Rserve.
Rserve needs to be installed manually to
your R environment depending on your environment.
One option is to install Rserve from CRAN by using:
install.packages("Rserve")
Before we can start with the build process, we need to start Rserve in order to be able connecting to the environment. The commands below demonstrate only an option to start the environment. It is also possible to directly start Rserve from your shell without entering the R console.
R
library("Rserve")
Rserve()
NOTE: The current compent implementation does not provide the full set of functionalities provided by RServe and supports only a limited set of opterations
- sendEval(String command) - EVAL
- sendVoidEval(String command) - VOID_EVAL
- sendAssign(String symbol, String content) - ASSIGN_CONTENT
- sendAssign(String symbol, REXP rexp) - ASSIGN_EXPRESSION
- sendParseAndEval(String command) - PARSE_AND_EVAL
rcode:host[:port]/operation[?options]
- rcode is the unique component key
- host defines a hostname as Java URI
- port defines the connection [port] (http://docs.oracle.com/javase/6/docs/api/java/net/URI.html)
- operation defines the operation executed via the endpoint. The operation can be any of the folling values [EVAL | VOID_EVAL | ASSIGN_CONTENT | ASSIGN_EXPRESSION | PARSE_AND_EVAL]
- options configure additional parameters.
Name | Type | Default | Description |
---|---|---|---|
user | String | null | Username to authenticate secured Rserve instances |
password | String | null | Password to authenticate secured Rserve instances |
bufferSize | long | 2097152 | Lowest value 32 KB, highest value 1GB bound to RAM |