I haven't used JRI much but since no-one has answered you I'll go for it.
I could be wrong, but it seems there is no method for converting res
to a boolean array – although there are methods for converting to int[]
, double[]
and String[]
. You could convert your result to integers like this:
REXP res = re.eval("result$dif.com$difference");
int[] x = res.asIntArray();
for (int i = 0; i < x.length; i++) {
System.out.println(x[i]);
}
You will get back 1
representing TRUE
values and 0
representing FALSE
. You can convert those numbers to booleans if you want from Java then or just work with them as they are.
Not an ideal solution so I hope someone comes up with something better.