Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用RCaller加载数据_Java_R_Rcaller_Gwmodel - Fatal编程技术网

Java 使用RCaller加载数据

Java 使用RCaller加载数据,java,r,rcaller,gwmodel,Java,R,Rcaller,Gwmodel,我想加载嵌入在R包中的数据。我使用GWmodel软件包,希望加载LondonHP数据。但当我尝试在Java中使用RCaller加载数据时,xml返回为: 这是我加载数据的代码: code.R_require(“GWmodel”); 代码addRCode(“数据(伦敦惠普)”); caller.setRCode(代码); caller.runAndReturnResult(“伦敦惠普”) 你们能为我的问题提供解决方案吗?我们可以在R控制台中看到londonhp对象的类型为S4: > ty

我想加载嵌入在R包中的数据。我使用GWmodel软件包,希望加载LondonHP数据。但当我尝试在Java中使用RCaller加载数据时,xml返回为:


这是我加载数据的代码:

code.R_require(“GWmodel”);
代码addRCode(“数据(伦敦惠普)”);
caller.setRCode(代码);
caller.runAndReturnResult(“伦敦惠普”)


你们能为我的问题提供解决方案吗?

我们可以在R控制台中看到londonhp对象的类型为S4

> typeof(londonhp)
[1] "S4"
因此,它有一些插槽:

> slotNames(londonhp)
[1] "data"        "coords.nrs"  "coords"      "bbox"        "proj4string"
您可以使用@操作符访问其元素:

> londonhp@data
所以你需要处理londonhp@data而不是伦敦