I want to load data which is embedded in an R package. I use GWmodel package and want to load LondonHP data. But when i try to load the data using RCaller in Java, the xml return is :
<?xml version="1.0"?>
<root>
</root>
This is my code to load the data :
code.R_require("GWmodel");
code.addRCode("data(LondonHP)");
caller.setRCode(code);
caller.runAndReturnResult("londonhp");
Can you guys give me solution to my problem?
We can see in R console that the londonhp object is in type of S4 :
So, it has some slots :
You can access its elements using the @ operator:
So you need to handle londonhp@data, not londonhp itself.