Java 使用RCaller加载数据
我想加载嵌入在R包中的数据。我使用GWmodel软件包,希望加载LondonHP数据。但当我尝试在Java中使用RCaller加载数据时,xml返回为: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
这是我加载数据的代码:
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而不是伦敦