RCaller 3.1 入门

Getting started with RCaller 3.1

我尝试从 RCaller 开始,但一开始就失败了。
当我尝试 运行 任何示例时,行

RCaller caller = RCaller.create(); 

给出以下异常:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.github.rcaller.rstuff.RCallerOptions.create(RCallerOptions.java:32)
    at com.github.rcaller.rstuff.RCaller.create(RCaller.java:83)
    at Test.main(Test.java:8)
Caused by: java.lang.NullPointerException
    at java.util.Arrays.sort(Unknown Source)
    at com.github.rcaller.util.Globals.<clinit>(Globals.java:65)
    ... 3 more

我猜原因是在Globals.java中,有为R定义的路径,不适合我的安装。如果是这样,问题就变成了:
如何告诉 RCaller 我的 R 安装在哪里?
我知道在早期版本的 RCaller 中,类似

caller.setRScriptExecutable( String path );
caller.setRExecutable( String path );  

存在,但此命令不再有效。
我还尝试手动更改 Globals.java,更改

public static String RScript_Windows = "C:\Program Files\R\R-3.0.2\bin\Rscript.exe";
public static String R_Windows = "C:\Program Files\R\R-3.0.2\bin\R.exe";

public static String RScript_Windows = "E:\R\R-3.1.1\bin\Rscript.exe";
public static String R_Windows = "E:\R\R-3.1.1\bin\R.exe";

但这不是正确的解决方案,而且无论如何也行不通。
有谁知道合适的解决方案吗?

RCaller 已更新以修复问题

创建 RCallerOptions 并将选项设置为 RCaller.create。 RCallerOptions.create 接受 R 可执行路径和 RScript 可执行路径的参数。

RCallerOptions options = RCallerOptions.create("D:\software\R\R-3.4.2\bin\Rscript.exe", "D:\software\R\R-3.4.2\bin\R.exe", FailurePolicy.RETRY_1, 3000l, 100l, RProcessStartUpOptions.create());
RCaller caller = RCaller.create(options);