yannrichet / rsession

R sessions wrapping for Java
BSD 2-Clause "Simplified" License
52 stars 31 forks source link

Error when running Rsession eval on multiple lines string #3

Closed GoogleCodeExporter closed 6 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

public static void main(String[] args) throws REXPMismatchException, 
RserveException {

        Rsession s = Rsession.newInstanceTry(System.out, null);
    //    RConnection s = new RConnection();

       String string;

       string = "x = 2 + 4" + "\n"
               + "x" + "\n"
               + "x + 2";

       String y;

       y = s.eval(string).asString();

       System.out.println(y);

        s.end();

}

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Any operating system

Please provide any additional information below.

If you use Rconnection instead, it works just fine

Original issue reported on code.google.com by alexandr...@gmail.com on 13 Nov 2012 at 3:30

yannrichet commented 6 years ago

thanks.