Test basic connection to localhost. 
00054                                   {
00055                 try {
00056                         REXP x = c.eval("R.version.string");
00057                         System.out.println(x.toString());
00058                         
00059                         double[] dataX, dataY;
00060                         dataX = new double[] { 1, 2, 3 };
00061                         dataY = new double[] { 1, 2, 3 };
00062                         c.assign("x", dataX);
00063                         c.assign("y", dataY);
00064                         
00065                         
00066                         
00067                         c.voidEval("m <- lm(x~y)");
00068                         double[] coeff = (double[]) c.eval("coefficients(m)").getContent();
00069                         for (int i = 0; i < coeff.length; i++) {
00070                                 System.out.println(coeff[i]);
00071                         }
00072                 } catch (Exception e) {
00073                         e.printStackTrace();
00074                         fail();
00075                 }
00076         }