//import org.rosuda.REngine.REXP;
//import org.rosuda.REngine.Rserve.RConnection;
public class RConnectionFromJava {
public static void main(String args[])
{
try{
System.out.println("INFO: Trying to connect to R ");
RConnection c = new RConnection();
System.out.println("INFO: Connected to R ");
System.out.println("INFO: The Server version is "+ c.getServerVersion());
c.close();
}
catch(Exception e)
{
System.out.println("ERROR: In Connection to R ");
System.out.println("The Exception is "+ e.getMessage());
e.printStackTrace();
}
}
}
这给RConnection带来了错误。你能告诉我为什么会出现这个错误吗?
答案 0 :(得分:1)
在import org.rosuda.REngine.Rserve.RConnection;