1

私はこのコードを持っています:

import org.rosuda.REngine.Rserve.RConnection;


public class TestProgram {

    public static void main(String[] args) {

           try {

               RConnection rConnection = new RConnection(); 
               // make a new local connection on default port (6311)
               rConnection.eval("for(i in 1:.Machine$integer.max){}");
               System.out.println("Done!");

           }
           catch(Exception e) {
               System.out.println(e.toString());
           }

    }


}

私はこの例外を受け取ります:

org.rosuda.REngine.Rserve.RserveException: eval failed, request status: error code: 127

私が変更した場合:

rConnection.eval("for(i in 1:.Machine$integer.max){}");

rConnection.eval("for(i in 1:777){}");

それは動作します:-)

誰が何が起こっているのか知っていますか?

PS私はR(同じマシン)からRserveを起動しました:

>library(Rserve)
>Rserve()
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rserve_1.7-3

loaded via a namespace (and not attached):
[1] tools_3.0.1

OS は Windows 8 です。Linux では試していません。

4

1 に答える 1