title: R JRI: trying to create data.frames from Java using REXP.createDataFrame
body: <p>I'm trying to create a data frame in R taking the data from an ArrayList in Java. </p>
  
  <p>The code below seems to be the official JRI test suite (<a href="http://www.rforge.net/DATRAS/files/org/rosuda/REngine/JRI/test/RTest.java" rel="nofollow">see this link</a>) however it doesn't even compile, for example in the first statement RList doesn't have a put method and REXP.createDataFrame method doesn't exist.</p>
  
  <p>Is there any updated example of <code>REXP.createDataFrame</code>? Couldn't find a concrete/functional example online. Also, couldn't find any JRI documentation.</p>
  
  <pre><code>     String[] Rargs = {"--vanilla"};
       Rengine re = new Rengine(Rargs, false, null);
  
       if (!re.waitForR()) {
           System.out.println("Cannot load R");
           return;
       }
  
       RList l = new RList();
       l.put("a",new REXPInteger(new int[] { 0,1,2,3}));
       l.put("b",new REXPDouble(new double[] { 0.5,1.2,2.3,3.0}));
  
       re.assign("z", REXP.createDataFrame(l));
  
       REXP x = re.parseAndEval("z");
       System.out.println("  z = " + x);
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found out that there are two <code>REXP</code> classes <code>org.rosuda.JRI.REXP</code> and  <code>org.rosuda.REngine.REXP</code>, the latter has the method <code>createDataFrame(l)</code>, however the assignment doesn't work.  How to assing a data frame to an R variable?</p>