R and Java Eclipse Plugin

The R and Java eclipse Plugin helps in setting up the environment for running java applications that can invoke R using the rJava JRI library. It provides a preference window where the necessary paths need to be set. The steps below explain what paths need to be set and where you can find them. Note … Read more

Execute R from Java

Introduction This page describes how to install the eclipse plugin that helps calling R from Java using JRI. This tutorial describes the Java Wrappers for R objects. Lets now look at the following Calling R functions from java Assigning values to R objects from Java Retrieving values from R into Java Calling R functions from … Read more

RServe Java multiple threads (Unix)

Concept On a unix environment it is possible for a threaded java application to call a single RServe instance. For each new connection RServe forks a new process. Each new connection has its own working directory. The working directory is retained if it is non empty, even when the connection is closed. Example Program The … Read more

RServe Java Source R script

Concept There are two ways to source R script file in RServe Java program. The first way is to directly source it in the java code. The only disadvantage of this method is that each connection would need to do this. As an example consider the following R code # http://rosettacode.org/wiki/Palindrome_detection#R ############################################################################### palindrome false } … Read more

RServe Java example program

Setup The steps to install and start RServe are shown in the previous tutorial. This tutorial explains how to create a java program that can talk to R using RServe on a linux platform. The steps to set up are. Lets assume for this tutorial that the working directory in linux where you want to … Read more

RServe – Introduction and Installation

Related Tutorials First Sample Program Introduction RServe is an R package that allows other applications to talk to R using TCP/IP. It creates a socket server to which other applications can connect. RServe provides client implementation for common languages such as C/C++, Java and PHP. In this series of tutorials we will look at how … Read more

Reshape R package, reshape2, melt and cast

In this tutorial we will look at Reshape R package, reshape2, melt and cast functions. Reshape R package – Introduction and concepts In this tutorial on data frame we saw the reshape function that can be used to convert multiple columns of a dataframe to multiple rows. In the current tutorial we look at the … Read more

Pretty printing in R using the Format function.

In the previous tutorial we looked at printing R objects using the print and cat functions. In this tutorial we look at Pretty printing in R using the Format function.. If R encounters a custom object then it calls the toString() generic method of that object. The sprintF method is a wrapper over C’s sprintf … Read more